wenkai commited on
Commit
491d478
·
verified ·
1 Parent(s): 8df133a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -197,8 +197,10 @@ def generate_caption(protein, prompt):
197
 
198
 
199
  def save_feedback(inputs):
 
200
  with open('feedback.txt', 'a+') as f:
201
  f.write(inputs+'\n')
 
202
 
203
 
204
  # Define the FAPM interface
@@ -260,7 +262,8 @@ with gr.Blocks(css=css) as demo:
260
  with gr.Row():
261
  with gr.Column():
262
  inputs = gr.Textbox(type="text")
 
263
  feedback_btn = gr.Button(value="Submit")
264
- feedback_btn.click(save_feedback, [inputs])
265
  demo.launch(debug=True)
266
 
 
197
 
198
 
199
  def save_feedback(inputs):
200
+ print(inputs)
201
  with open('feedback.txt', 'a+') as f:
202
  f.write(inputs+'\n')
203
+ return "Thanks your advice!"
204
 
205
 
206
  # Define the FAPM interface
 
262
  with gr.Row():
263
  with gr.Column():
264
  inputs = gr.Textbox(type="text")
265
+ output_markdown = gr.Markdown(label="Output")
266
  feedback_btn = gr.Button(value="Submit")
267
+ feedback_btn.click(save_feedback, [inputs], [output_markdown])
268
  demo.launch(debug=True)
269