Aftrr commited on
Commit
c488b3b
Β·
verified Β·
1 Parent(s): 98711d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
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("## πŸ€– CHatapt")
26
 
27
  chatbot = gr.Chatbot()
28
- state = gr.State([])
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