macadeliccc commited on
Commit
d2b7f91
1 Parent(s): aa64952
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -48,12 +48,22 @@ def chat_with_ochat(message):
48
 
49
 
50
 
51
- # Create a Gradio Interface
 
 
 
52
  iface = gr.Interface(
53
  fn=chat_with_ochat,
54
- inputs="text",
55
- outputs="text",
 
 
 
56
  title="ochat Chat Interface",
57
- description="Type your message and get a response from the ochat server."
 
 
 
58
  )
 
59
  iface.launch()
 
48
 
49
 
50
 
51
+ def clear_chat():
52
+ return "Chat cleared. You can start a new conversation."
53
+
54
+ # Create a Gradio Interface with an improved layout
55
  iface = gr.Interface(
56
  fn=chat_with_ochat,
57
+ inputs=gr.Textbox(lines=2, placeholder="Type your message here..."),
58
+ outputs=[
59
+ gr.Textbox(label="ochat Response", placeholder="Response will appear here...", interactive=False),
60
+ gr.Button("Clear Chat", fn=clear_chat)
61
+ ],
62
  title="ochat Chat Interface",
63
+ description="Engage in a conversation with the ochat server. Type your message below and get a response.",
64
+ layout="vertical",
65
+ theme="huggingface", # This is an example theme, you can choose others
66
+ css=".input_text {height: 50px;} .output_text {height: 100px;}"
67
  )
68
+
69
  iface.launch()