kookoobau commited on
Commit
9c714c1
1 Parent(s): 09d7e31
Files changed (1) hide show
  1. app.py +4 -3
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(model_path)
13
- model = AutoModelForCausalLM.from_pretrained(model_path)
 
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}