Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import BlenderbotTokenizer, BlenderbotForConditionalGeneration
|
| 3 |
|
| 4 |
-
# β
Better small chatbot model
|
| 5 |
MODEL_ID = "facebook/blenderbot-400M-distill"
|
| 6 |
|
| 7 |
tokenizer = BlenderbotTokenizer.from_pretrained(MODEL_ID)
|
|
@@ -22,11 +22,7 @@ def chat(history, message):
|
|
| 22 |
return history, history
|
| 23 |
|
| 24 |
with gr.Blocks() as demo:
|
| 25 |
-
gr.Markdown("## π€
|
| 26 |
|
| 27 |
chatbot = gr.Chatbot()
|
| 28 |
-
state = gr
|
| 29 |
-
|
| 30 |
-
msg = gr.Textbox(show_label=False, placeholder="Type a message and press Enter...")
|
| 31 |
-
|
| 32 |
-
msg.submit(chat, [state,]()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import BlenderbotTokenizer, BlenderbotForConditionalGeneration
|
| 3 |
|
| 4 |
+
# β
Better small chatbot model (normal replies)
|
| 5 |
MODEL_ID = "facebook/blenderbot-400M-distill"
|
| 6 |
|
| 7 |
tokenizer = BlenderbotTokenizer.from_pretrained(MODEL_ID)
|
|
|
|
| 22 |
return history, history
|
| 23 |
|
| 24 |
with gr.Blocks() as demo:
|
| 25 |
+
gr.Markdown("## π€ Anuj's Chatbot (Now Smarter!)")
|
| 26 |
|
| 27 |
chatbot = gr.Chatbot()
|
| 28 |
+
state = gr
|
|
|
|
|
|
|
|
|
|
|
|