mrsandip commited on
Commit
55bafb5
·
verified ·
1 Parent(s): 71a8fc3

Fix Gradio6 chat UI

Browse files
Files changed (1) hide show
  1. app/ui.py +3 -3
app/ui.py CHANGED
@@ -39,11 +39,11 @@ def stream_reply(message, history, image, file, video):
39
  yield history, "✅ Done"
40
  return history, "✅ Done"
41
 
42
- with gr.Blocks(title="Alfa-Code", css=CSS, theme=gr.themes.Soft()) as demo:
43
  gr.Markdown("# 💬 Alfa-Code\n*Coding AI — reasoning + image + file + video*")
44
  with gr.Row():
45
  with gr.Column(scale=3):
46
- chatbot = gr.Chatbot(label="Chat", elem_id="chatbot", type="messages", show_copy_button=True)
47
  with gr.Row():
48
  msg = gr.Textbox(placeholder="Ask to code... (Enter to send)", show_label=False, scale=4)
49
  send = gr.Button("Send ➤", elem_id="send", scale=1)
@@ -67,4 +67,4 @@ with gr.Blocks(title="Alfa-Code", css=CSS, theme=gr.themes.Soft()) as demo:
67
  if __name__ == "__main__":
68
  import sys
69
  port = int(sys.argv[1]) if len(sys.argv) > 1 else 7861
70
- demo.launch(server_name="127.0.0.1", server_port=port)
 
39
  yield history, "✅ Done"
40
  return history, "✅ Done"
41
 
42
+ with gr.Blocks(title="Alfa-Code") as demo:
43
  gr.Markdown("# 💬 Alfa-Code\n*Coding AI — reasoning + image + file + video*")
44
  with gr.Row():
45
  with gr.Column(scale=3):
46
+ chatbot = gr.Chatbot(label="Chat", elem_id="chatbot", height=500, buttons=["copy"])
47
  with gr.Row():
48
  msg = gr.Textbox(placeholder="Ask to code... (Enter to send)", show_label=False, scale=4)
49
  send = gr.Button("Send ➤", elem_id="send", scale=1)
 
67
  if __name__ == "__main__":
68
  import sys
69
  port = int(sys.argv[1]) if len(sys.argv) > 1 else 7861
70
+ demo.launch(server_name="127.0.0.1", server_port=port, theme=gr.themes.Soft(), css=CSS)