Spaces:
Runtime error
Runtime error
Update consult.py
Browse files- consult.py +6 -0
consult.py
CHANGED
@@ -47,21 +47,25 @@ os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
|
|
47 |
#########################################################################################
|
48 |
#第四题专用函数:(经过调整,第五题也可以用)
|
49 |
def text_score4(text):
|
|
|
50 |
text,score=text_score(text)
|
51 |
return text,score,gr.Column(visible=True),text,score
|
52 |
|
53 |
|
54 |
def speech_score4(audio):
|
|
|
55 |
text,score=speech_score(audio)
|
56 |
return text,score,gr.Column(visible=True),text,score
|
57 |
|
58 |
|
59 |
def video_score4(video):
|
|
|
60 |
text,score=video_score(video)
|
61 |
return text,score,gr.Column(visible=True),text,score
|
62 |
#########################################################################################
|
63 |
#第三题专用函数:(融入keyword识别)
|
64 |
def text_score3(text):
|
|
|
65 |
text,score=text_score(text)
|
66 |
if keyword(text):
|
67 |
return text,score,gr.Radio(visible=True), gr.Column(visible=False),text,score
|
@@ -69,6 +73,7 @@ def text_score3(text):
|
|
69 |
return text,score,gr.Radio(visible=False), gr.Column(visible=True),text,score
|
70 |
|
71 |
def speech_score3(audio):
|
|
|
72 |
text,score=speech_score(audio)
|
73 |
if keyword(text):
|
74 |
return text,score,gr.Radio(visible=True), gr.Column(visible=False),text,score
|
@@ -76,6 +81,7 @@ def speech_score3(audio):
|
|
76 |
return text,score,gr.Radio(visible=False), gr.Column(visible=True),text,score
|
77 |
|
78 |
def video_score3(video):
|
|
|
79 |
text,score=video_score(video)
|
80 |
if keyword(text):
|
81 |
return text,score,gr.Radio(visible=True), gr.Column(visible=False),text,score
|
|
|
47 |
#########################################################################################
|
48 |
#第四题专用函数:(经过调整,第五题也可以用)
|
49 |
def text_score4(text):
|
50 |
+
gr.Info("数据处理中,请耐心等候..")
|
51 |
text,score=text_score(text)
|
52 |
return text,score,gr.Column(visible=True),text,score
|
53 |
|
54 |
|
55 |
def speech_score4(audio):
|
56 |
+
gr.Info("数据处理中,请耐心等候..")
|
57 |
text,score=speech_score(audio)
|
58 |
return text,score,gr.Column(visible=True),text,score
|
59 |
|
60 |
|
61 |
def video_score4(video):
|
62 |
+
gr.Info("数据处理中,请耐心等候..")
|
63 |
text,score=video_score(video)
|
64 |
return text,score,gr.Column(visible=True),text,score
|
65 |
#########################################################################################
|
66 |
#第三题专用函数:(融入keyword识别)
|
67 |
def text_score3(text):
|
68 |
+
gr.Info("数据处理中,请耐心等候..")
|
69 |
text,score=text_score(text)
|
70 |
if keyword(text):
|
71 |
return text,score,gr.Radio(visible=True), gr.Column(visible=False),text,score
|
|
|
73 |
return text,score,gr.Radio(visible=False), gr.Column(visible=True),text,score
|
74 |
|
75 |
def speech_score3(audio):
|
76 |
+
gr.Info("数据处理中,请耐心等候..")
|
77 |
text,score=speech_score(audio)
|
78 |
if keyword(text):
|
79 |
return text,score,gr.Radio(visible=True), gr.Column(visible=False),text,score
|
|
|
81 |
return text,score,gr.Radio(visible=False), gr.Column(visible=True),text,score
|
82 |
|
83 |
def video_score3(video):
|
84 |
+
gr.Info("数据处理中,请耐心等候..")
|
85 |
text,score=video_score(video)
|
86 |
if keyword(text):
|
87 |
return text,score,gr.Radio(visible=True), gr.Column(visible=False),text,score
|