Spaces:
Runtime error
Runtime error
Commit ·
65de25e
1
Parent(s): be71b07
Update app to remove hf_token
Browse files
app.py
CHANGED
|
@@ -4,13 +4,12 @@ import gradio as gr
|
|
| 4 |
# Define the model name
|
| 5 |
model_name = "tiiuae/falcon-10b-instruct"
|
| 6 |
|
| 7 |
-
# Load the tokenizer and model
|
| 8 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name
|
| 9 |
model = AutoModelForCausalLM.from_pretrained(
|
| 10 |
model_name,
|
| 11 |
torch_dtype="auto",
|
| 12 |
-
device_map="auto"
|
| 13 |
-
use_auth_token=hf_token
|
| 14 |
)
|
| 15 |
|
| 16 |
# Define a simple chat function
|
|
|
|
| 4 |
# Define the model name
|
| 5 |
model_name = "tiiuae/falcon-10b-instruct"
|
| 6 |
|
| 7 |
+
# Load the tokenizer and model
|
| 8 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 9 |
model = AutoModelForCausalLM.from_pretrained(
|
| 10 |
model_name,
|
| 11 |
torch_dtype="auto",
|
| 12 |
+
device_map="auto"
|
|
|
|
| 13 |
)
|
| 14 |
|
| 15 |
# Define a simple chat function
|