SamiKoen commited on
Commit
50bcd40
·
1 Parent(s): f273a64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -135,11 +135,11 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
135
  chatbot = gr.Chatbot(label='GPT4', elem_id="chatbot")
136
  inputs = gr.Textbox(placeholder= "Buraya yazın, yanıtlayalım.", show_label= False)
137
  state = gr.State([])
138
- with gr.Row():
139
  with gr.Column(scale=7):
140
  b1 = gr.Button().style(full_width=True)
141
  with gr.Column(scale=3):
142
- server_status_code = gr.Textbox(label="Status code from OpenAI server", )
143
 
144
  #top_p, temperature
145
  with gr.Accordion("Parameters", open=False):
@@ -148,10 +148,10 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
148
  chat_counter = gr.Number(value=0, visible=False, precision=0)
149
 
150
  #Event handling
151
- inputs.submit( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
152
- b1.click( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
153
 
154
- b1.click(reset_textbox, [], [inputs])
155
  inputs.submit(reset_textbox, [], [inputs])
156
 
157
  demo.queue(max_size=20, concurrency_count=20).launch(debug=True)
 
135
  chatbot = gr.Chatbot(label='GPT4', elem_id="chatbot")
136
  inputs = gr.Textbox(placeholder= "Buraya yazın, yanıtlayalım.", show_label= False)
137
  state = gr.State([])
138
+ '''with gr.Row():
139
  with gr.Column(scale=7):
140
  b1 = gr.Button().style(full_width=True)
141
  with gr.Column(scale=3):
142
+ server_status_code = gr.Textbox(label="Status code from OpenAI server", )'''
143
 
144
  #top_p, temperature
145
  with gr.Accordion("Parameters", open=False):
 
148
  chat_counter = gr.Number(value=0, visible=False, precision=0)
149
 
150
  #Event handling
151
+ inputs.submit( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter,],) #openai_api_key
152
+ #b1.click( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
153
 
154
+ #b1.click(reset_textbox, [], [inputs])
155
  inputs.submit(reset_textbox, [], [inputs])
156
 
157
  demo.queue(max_size=20, concurrency_count=20).launch(debug=True)