Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -7,10 +7,11 @@ from huggingface_hub import hf_hub_download
|
|
7 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
8 |
import gradio as gr
|
9 |
|
10 |
-
model_path = hf_hub_download(repo_id="microsoft/DialoGPT-medium", filename="pytorch_model.bin")
|
11 |
# Load the tokenizer and model
|
12 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
13 |
-
|
|
|
14 |
|
15 |
|
16 |
template = """Question: {question}
|
|
|
7 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
8 |
import gradio as gr
|
9 |
|
10 |
+
# model_path = hf_hub_download(repo_id="microsoft/DialoGPT-medium", filename="pytorch_model.bin")
|
11 |
# Load the tokenizer and model
|
12 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-medium")
|
13 |
+
|
14 |
+
model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-medium")
|
15 |
|
16 |
|
17 |
template = """Question: {question}
|