Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,14 @@ import transformers
|
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
-
|
| 7 |
# checkpoint = "tiiuae/falcon-7b-instruct"
|
| 8 |
-
checkpoint = "microsoft/phi-1_5"
|
| 9 |
|
| 10 |
model = AutoModelForCausalLM.from_pretrained(
|
| 11 |
-
checkpoint, device_map="auto", offload_folder="offload", trust_remote_code=True)
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
tokenizer = AutoTokenizer.from_pretrained(checkpoint, )
|
| 14 |
pipeline = transformers.pipeline(
|
| 15 |
"text-generation",
|
| 16 |
model=model,
|
|
|
|
| 3 |
import torch
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
+
checkpoint = "tiiuae/falcon-40b-instruct"
|
| 7 |
# checkpoint = "tiiuae/falcon-7b-instruct"
|
|
|
|
| 8 |
|
| 9 |
model = AutoModelForCausalLM.from_pretrained(
|
| 10 |
+
checkpoint, device_map="auto", offload_folder="offload", trust_remote_code=True,)
|
| 11 |
+
|
| 12 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True,")
|
| 13 |
|
|
|
|
| 14 |
pipeline = transformers.pipeline(
|
| 15 |
"text-generation",
|
| 16 |
model=model,
|