dennis-fast commited on
Commit
d5f9984
1 Parent(s): 3a60119

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,8 +4,8 @@ import torch
4
 
5
  from transformers import GPT2LMHeadModel, GPT2Tokenizer
6
 
7
- tokenizer = GPT2Tokenizer.from_pretrained('microsoft/DialoGPT-small')
8
- model = GPT2LMHeadModel.from_pretrained('microsoft/DialoGPT-small')
9
 
10
  def chat(message, token_response):
11
  token_message = tokenizer.encode(message + tokenizer.eos_token, return_tensors='pt')
@@ -14,10 +14,10 @@ def chat(message, token_response):
14
  return response, token_response
15
 
16
  input = gr.inputs.Textbox(lines=2, label='User:')
17
- output = gr.outputs.Textbox(label='Bot:')
18
 
19
  gr.Interface(fn=chat,
20
- title="DialoGPT-small",
21
  inputs=[input, "state"],
22
  outputs=[output, "state"],
23
  allow_screenshot=False,
 
4
 
5
  from transformers import GPT2LMHeadModel, GPT2Tokenizer
6
 
7
+ tokenizer = GPT2Tokenizer.from_pretrained('dennis-fast/DialoGPT-ElonMusk')
8
+ model = GPT2LMHeadModel.from_pretrained('dennis-fast/DialoGPT-ElonMusk')
9
 
10
  def chat(message, token_response):
11
  token_message = tokenizer.encode(message + tokenizer.eos_token, return_tensors='pt')
 
14
  return response, token_response
15
 
16
  input = gr.inputs.Textbox(lines=2, label='User:')
17
+ output = gr.outputs.Textbox(label='Elon:')
18
 
19
  gr.Interface(fn=chat,
20
+ title="Chat with Elon",
21
  inputs=[input, "state"],
22
  outputs=[output, "state"],
23
  allow_screenshot=False,