Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,12 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
|
3 |
import spaces
|
4 |
|
5 |
# Load the tokenizer and model
|
6 |
-
|
7 |
-
|
|
|
8 |
|
9 |
# Use a pipeline as a high-level helper
|
10 |
-
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer
|
11 |
|
12 |
# Define the chatbot function
|
13 |
@spaces.GPU(duration=120)
|
|
|
3 |
import spaces
|
4 |
|
5 |
# Load the tokenizer and model
|
6 |
+
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("Yoxas/autotrain-gpt2-statistical1")
|
8 |
+
model = AutoModelForCausalLM.from_pretrained("Yoxas/autotrain-gpt2-statistical1")
|
9 |
|
10 |
# Use a pipeline as a high-level helper
|
11 |
+
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
12 |
|
13 |
# Define the chatbot function
|
14 |
@spaces.GPU(duration=120)
|