Liusuthu commited on
Commit
27117a8
Β·
verified Β·
1 Parent(s): ffdd1bd

Update consult.py

Browse files
Files changed (1) hide show
  1. consult.py +10 -2
consult.py CHANGED
@@ -28,6 +28,7 @@ from consult_func import (
28
  visibility_choice4,
29
  visibility_choice5,
30
  keyword,
 
31
  )
32
 
33
  os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
@@ -82,7 +83,12 @@ def video_score3(video):
82
  else:
83
  return text,score,gr.Radio(visible=False), gr.Column(visible=True),text,score
84
  #########################################################################################
85
-
 
 
 
 
 
86
  # constants
87
  schema = "ζƒ…ζ„Ÿε€Ύε‘[ζ­£ε‘οΌŒθ΄Ÿε‘]" # Define the schema for sentence-level sentiment classification
88
 
@@ -350,4 +356,6 @@ with gr.Blocks() as consult:
350
  [final_result,title6, final_score, adv,save_button],
351
  )
352
 
353
- save_button.click(visibility,inputs=[],outputs=[save])
 
 
 
28
  visibility_choice4,
29
  visibility_choice5,
30
  keyword,
31
+ save2,
32
  )
33
 
34
  os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
 
83
  else:
84
  return text,score,gr.Radio(visible=False), gr.Column(visible=True),text,score
85
  #########################################################################################
86
+ def clear_info():
87
+ return (
88
+ gr.Textbox(""),
89
+ gr.Textbox(""),
90
+ gr.Textbox(""),
91
+ )
92
  # constants
93
  schema = "ζƒ…ζ„Ÿε€Ύε‘[ζ­£ε‘οΌŒθ΄Ÿε‘]" # Define the schema for sentence-level sentiment classification
94
 
 
356
  [final_result,title6, final_score, adv,save_button],
357
  )
358
 
359
+ save_button.click(visibility,inputs=[],outputs=[save])
360
+ cler_button.click(clear_info,inputs=[],outputs=[input_name, input_pwd, output_info])
361
+ submit_button.click(save2,inputs=[input_name,inpu_pwd],outputs=[output_info])