Spaces:
Sleeping
Sleeping
Commit
•
56a0845
1
Parent(s):
cf14061
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ model_name = "fine_tuned_model123"
|
|
16 |
#tokenizer = GPT2Tokenizer.from_pretrained(model_name)
|
17 |
|
18 |
# Load the tokenizer and model from Hugging Face Hub
|
19 |
-
|
20 |
-
|
21 |
|
22 |
def predict(input, history=[]):
|
23 |
# tokenize the new input sentence
|
|
|
16 |
#tokenizer = GPT2Tokenizer.from_pretrained(model_name)
|
17 |
|
18 |
# Load the tokenizer and model from Hugging Face Hub
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
20 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
21 |
|
22 |
def predict(input, history=[]):
|
23 |
# tokenize the new input sentence
|