Abid commited on
Commit
3598271
1 Parent(s): 8fa97fa

medium rick bot model added

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -1,8 +1,8 @@
1
  from transformers import AutoModelForCausalLM, AutoTokenizer
2
  import torch
3
 
4
- tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-medium")
5
- model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-medium")
6
 
7
 
8
  def predict(input, history=[]):
@@ -33,18 +33,19 @@ demo = gr.Blocks()
33
 
34
  with demo:
35
  gr.Markdown(
36
- """
37
  ![cover](https://huggingface.co/spaces/Gradio-Blocks/RickandMorty-BlockParty/resolve/main/img/img1.png)
38
  # Let's start the party with Rick & Morty
39
  Chat with Morty by typing in the input box below.
40
- """)
41
-
 
42
  gr.Interface(
43
- fn=predict,
44
- theme="default",
45
- css=".footer {display:none !important}",
46
- inputs=["text", "state"],
47
- outputs=["chatbot", "state"],
48
- )
49
 
50
  demo.launch()
 
1
  from transformers import AutoModelForCausalLM, AutoTokenizer
2
  import torch
3
 
4
+ tokenizer = AutoTokenizer.from_pretrained("ericzhou/DialoGPT-Medium-Rick_v2")
5
+ model = AutoModelForCausalLM.from_pretrained("ericzhou/DialoGPT-Medium-Rick_v2")
6
 
7
 
8
  def predict(input, history=[]):
 
33
 
34
  with demo:
35
  gr.Markdown(
36
+ """
37
  ![cover](https://huggingface.co/spaces/Gradio-Blocks/RickandMorty-BlockParty/resolve/main/img/img1.png)
38
  # Let's start the party with Rick & Morty
39
  Chat with Morty by typing in the input box below.
40
+ """
41
+ )
42
+
43
  gr.Interface(
44
+ fn=predict,
45
+ theme="default",
46
+ css=".footer {display:none !important}",
47
+ inputs=["text", "state"],
48
+ outputs=["chatbot", "state"],
49
+ )
50
 
51
  demo.launch()