shljessie commited on
Commit
bbf1954
·
1 Parent(s): a2feab1

configure basic ui

Browse files
Files changed (1) hide show
  1. app.py +16 -10
app.py CHANGED
@@ -45,14 +45,20 @@ def yes_man(message, history):
45
  else:
46
  return "Ask me anything!"
47
 
 
 
 
48
  # Create the Gradio interface
49
- iface = gr.Interface(
50
- fn=yes_man,
51
- inputs=gr.inputs.Textbox(lines=2, placeholder="Type your message here..."),
52
- outputs="text",
53
- title="Llama-2 7B Chatbot",
54
- description="This is a chatbot powered by the Llama-2 7B model. Try asking it something!",
55
- )
56
-
57
- if __name__ == "__main__":
58
- iface.launch()
 
 
 
 
45
  else:
46
  return "Ask me anything!"
47
 
48
+
49
+
50
+
51
  # Create the Gradio interface
52
+ gr.ChatInterface(
53
+ yes_man,
54
+ chatbot=gr.Chatbot(height=300),
55
+ textbox=gr.Textbox(placeholder="Ask me a yes or no question", container=False, scale=7),
56
+ title="Yes Man",
57
+ description="Ask Yes Man any question",
58
+ theme="soft",
59
+ examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
60
+ cache_examples=True,
61
+ retry_btn=None,
62
+ undo_btn="Delete Previous",
63
+ clear_btn="Clear",
64
+ ).launch()