Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
-
from transformers import AutoTokenizer,
|
4 |
|
5 |
-
tokenizer = AutoTokenizer.from_pretrained("Wonder-Griffin/
|
6 |
|
7 |
-
pipe = pipeline("text-generation", model="Wonder-Griffin/
|
8 |
|
9 |
# Assuming `model_path` is the Hugging Face model hub path or a local directory
|
10 |
-
model_path = "Wonder-Griffin/
|
11 |
|
12 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
13 |
-
model =
|
14 |
model_path,
|
15 |
device_map="auto",
|
16 |
torch_dtype='auto'
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("Wonder-Griffin/TraXLMistral")
|
6 |
|
7 |
+
pipe = pipeline("text-generation", model="Wonder-Griffin/TraXLMistral")
|
8 |
|
9 |
# Assuming `model_path` is the Hugging Face model hub path or a local directory
|
10 |
+
model_path = "Wonder-Griffin/TraXLMistral" # Define this as needed
|
11 |
|
12 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
13 |
+
model = AutoModelForCausalLM.from_pretrained(
|
14 |
model_path,
|
15 |
device_map="auto",
|
16 |
torch_dtype='auto'
|