JiheonJeong commited on
Commit
5c7093e
·
1 Parent(s): 8d3a5ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -92,9 +92,9 @@ def submit(image, *agents):
92
 
93
  Answer = 'O'
94
  for k in range(TOTAL_K):
95
- agents[k].update(value = Answer)
96
 
97
- return np.array(new_image)
98
 
99
  theme = gr.themes.Default(primary_hue="green")
100
  agents = []
@@ -165,7 +165,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
165
  b0.click(random_sample, inputs = [], outputs = [image])
166
  b2.click(reset_sample, inputs = [], outputs = [image])
167
 
168
- b1.click(submit, inputs = [image, *agents], outputs = [image])
169
 
170
  # inputs.submit(reset_textbox, [], [inputs, b1], queue=False)
171
  # inputs.submit(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code, inputs, b1],) #openai_api_key
 
92
 
93
  Answer = 'O'
94
  for k in range(TOTAL_K):
95
+ agents[k] = Answer
96
 
97
+ return np.array(new_image), agents
98
 
99
  theme = gr.themes.Default(primary_hue="green")
100
  agents = []
 
165
  b0.click(random_sample, inputs = [], outputs = [image])
166
  b2.click(reset_sample, inputs = [], outputs = [image])
167
 
168
+ b1.click(submit, inputs = [image, *agents], outputs = [image, *agents])
169
 
170
  # inputs.submit(reset_textbox, [], [inputs, b1], queue=False)
171
  # inputs.submit(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code, inputs, b1],) #openai_api_key