adnansami1992sami commited on
Commit
2f91ab3
·
1 Parent(s): 8a35ed9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -49,7 +49,7 @@ def format_chat_prompt(message: str, chat_history, instructions: str) -> str:
49
 
50
 
51
  def chat(client: Client):
52
- inputs = gr.Row(input_text, enter_button),
53
  with gr.Column(elem_id="chat_container"):
54
  with gr.Row():
55
  chatbot = gr.Chatbot(elem_id="chatbot")
@@ -62,17 +62,17 @@ def chat(client: Client):
62
 
63
  enter_button = gr.Button("Enter")
64
 
65
- def on_enter_click():
66
- message = input_text.value.strip()
67
- input_text.update(value="")
68
- input_text.submit(
69
- run_chat,
70
- [message, chatbot, instructions, temperature, top_p],
71
- outputs=[chatbot],
72
- show_progress=False,
73
- )
74
- enter_button.click(on_enter_click)
75
- inputs= gr.Row(input_text, enter_button)
76
 
77
 
78
  with gr.Row(elem_id="button_container"):
 
49
 
50
 
51
  def chat(client: Client):
52
+
53
  with gr.Column(elem_id="chat_container"):
54
  with gr.Row():
55
  chatbot = gr.Chatbot(elem_id="chatbot")
 
62
 
63
  enter_button = gr.Button("Enter")
64
 
65
+ def on_enter_click():
66
+ message = input_text.value.strip()
67
+ input_text.update(value="")
68
+ input_text.submit(
69
+ run_chat,
70
+ [message, chatbot, instructions, temperature, top_p],
71
+ outputs=[chatbot],
72
+ show_progress=False,
73
+ )
74
+ enter_button.click(on_enter_click)
75
+ inputs= gr.Row(input_text, enter_button),
76
 
77
 
78
  with gr.Row(elem_id="button_container"):