mrcuddle commited on
Commit
1d4637f
·
verified ·
1 Parent(s): c134b6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -54,13 +54,19 @@ def chatbot(message, history):
54
 
55
  # Create the Gradio interface
56
  with gr.Blocks() as demo:
57
- gr.Markdown("<center><h1>Dark-Hermes3-Llama3.2-3B Chatbot</h1></center>")
 
58
 
59
- chat_interface = gr.ChatInterface(
60
- fn=chatbot,
61
- examples=["Hello!", "How are you?", "Tell me a joke.", "What is AI?"],
62
- type="messages"
63
- )
 
 
 
 
 
64
 
65
  # Launch the interface
66
  if __name__ == "__main__":
 
54
 
55
  # Create the Gradio interface
56
  with gr.Blocks() as demo:
57
+ gr.Markdown("## Dark-Hermes3-Llama3.2-3B Chatbot")
58
+ gr.Markdown("A chatbot interface powered by the Dark-Hermes3-Llama3.2-3B model. Ask me anything!")
59
 
60
+ chatbot_component = gr.Chatbot([], elem_id="chatbot")
61
+ state = gr.State([])
62
+
63
+ with gr.Row():
64
+ txt = gr.Textbox(
65
+ show_label=False,
66
+ placeholder="Type your message here...",
67
+ ).style(container=False)
68
+
69
+ txt.submit(chatbot, [txt, state], [chatbot_component, state])
70
 
71
  # Launch the interface
72
  if __name__ == "__main__":