Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
pipe = pipeline("text-generation", model="Wonder-Griffin/TraXL")
|
| 5 |
|
|
@@ -7,7 +11,7 @@ pipe = pipeline("text-generation", model="Wonder-Griffin/TraXL")
|
|
| 7 |
model_path = "Wonder-Griffin/TraXL" # Define this as needed
|
| 8 |
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 10 |
-
model =
|
| 11 |
model_path,
|
| 12 |
device_map="auto",
|
| 13 |
torch_dtype='auto'
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
+
from transformers import AutoTokenizer, TraXL
|
| 4 |
+
|
| 5 |
+
tokenizer = AutoTokenizer.from_pretrained("Wonder-Griffin/TraXL")
|
| 6 |
+
# model = TraXL.from_pretrained("Wonder-Griffin/TraXL")
|
| 7 |
|
| 8 |
pipe = pipeline("text-generation", model="Wonder-Griffin/TraXL")
|
| 9 |
|
|
|
|
| 11 |
model_path = "Wonder-Griffin/TraXL" # Define this as needed
|
| 12 |
|
| 13 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 14 |
+
model = TraXL.from_pretrained(
|
| 15 |
model_path,
|
| 16 |
device_map="auto",
|
| 17 |
torch_dtype='auto'
|