Spaces:
Runtime error
Runtime error
Chan Lee
commited on
Commit
•
ff27340
1
Parent(s):
0c65a08
removed 'other' due to memory limit
Browse files
app.py
CHANGED
@@ -229,10 +229,10 @@ stress = Parallel(stress_bert_io, stress_phs_io,
|
|
229 |
description=stress_desc)
|
230 |
# theme="peach")
|
231 |
|
232 |
-
folder = "ot/"
|
233 |
-
other_predictor_bert = ktrain.load_predictor(folder + "bert")
|
234 |
-
other_predictor_mental = ktrain.load_predictor(folder + "mentalbert")
|
235 |
-
other_predictor_phs = ktrain.load_predictor(folder + "phsbert")
|
236 |
|
237 |
def ot_output(number):
|
238 |
if int(number) == 0:
|
@@ -250,18 +250,18 @@ def other_MentalBERT(text):
|
|
250 |
def other_PHSBERT(text):
|
251 |
return "PHS-BERT ➡ " + ot_output(other_predictor_phs.predict(str(text)))
|
252 |
|
253 |
-
other_bert_io = Interface(fn=other_BERT, inputs="text", outputs="text")
|
254 |
-
other_mental_io = Interface(fn=other_MentalBERT, inputs="text", outputs="text")
|
255 |
-
other_phs_io = Interface(fn=other_PHSBERT, inputs="text", outputs="text")
|
256 |
# other = Parallel(other_bert_io, other_mental_io, other_phs_io,
|
257 |
# examples=other_examples,
|
258 |
# title=other_title,
|
259 |
# description=other_desc,
|
260 |
# theme="peach")
|
261 |
-
other = Parallel(other_bert_io, other_phs_io,
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
# theme="peach")
|
266 |
# vs_bert_io, vs_mental_io, vs_phs_io = make_interfaces("vs/")
|
267 |
# vs = Parallel(vs_bert_io, vs_mental_io, vs_phs_io,
|
@@ -319,8 +319,12 @@ other = Parallel(other_bert_io, other_phs_io,
|
|
319 |
# interfaces = [vs, hm, dep, covid, suicide, stress, other]
|
320 |
# interface_names = [vs_title, hm_title, dep_title, covid_title, suicide_title, stress_title, other_title]
|
321 |
|
322 |
-
interfaces = [vs, hm, covid, stress, other]
|
323 |
-
interface_names = [vs_title, hm_title, covid_title, stress_title, other_title]
|
|
|
|
|
|
|
|
|
324 |
|
325 |
# interfaces = [covid, stress]
|
326 |
# interface_names = [covid_title, stress_title]
|
|
|
229 |
description=stress_desc)
|
230 |
# theme="peach")
|
231 |
|
232 |
+
# folder = "ot/"
|
233 |
+
# other_predictor_bert = ktrain.load_predictor(folder + "bert")
|
234 |
+
# other_predictor_mental = ktrain.load_predictor(folder + "mentalbert")
|
235 |
+
# other_predictor_phs = ktrain.load_predictor(folder + "phsbert")
|
236 |
|
237 |
def ot_output(number):
|
238 |
if int(number) == 0:
|
|
|
250 |
def other_PHSBERT(text):
|
251 |
return "PHS-BERT ➡ " + ot_output(other_predictor_phs.predict(str(text)))
|
252 |
|
253 |
+
# other_bert_io = Interface(fn=other_BERT, inputs="text", outputs="text")
|
254 |
+
# other_mental_io = Interface(fn=other_MentalBERT, inputs="text", outputs="text")
|
255 |
+
# other_phs_io = Interface(fn=other_PHSBERT, inputs="text", outputs="text")
|
256 |
# other = Parallel(other_bert_io, other_mental_io, other_phs_io,
|
257 |
# examples=other_examples,
|
258 |
# title=other_title,
|
259 |
# description=other_desc,
|
260 |
# theme="peach")
|
261 |
+
# other = Parallel(other_bert_io, other_phs_io,
|
262 |
+
# examples=other_examples,
|
263 |
+
# title=other_title,
|
264 |
+
# description=other_desc)
|
265 |
# theme="peach")
|
266 |
# vs_bert_io, vs_mental_io, vs_phs_io = make_interfaces("vs/")
|
267 |
# vs = Parallel(vs_bert_io, vs_mental_io, vs_phs_io,
|
|
|
319 |
# interfaces = [vs, hm, dep, covid, suicide, stress, other]
|
320 |
# interface_names = [vs_title, hm_title, dep_title, covid_title, suicide_title, stress_title, other_title]
|
321 |
|
322 |
+
# interfaces = [vs, hm, covid, stress, other]
|
323 |
+
# interface_names = [vs_title, hm_title, covid_title, stress_title, other_title]
|
324 |
+
|
325 |
+
interfaces = [vs, hm, covid, stress]
|
326 |
+
interface_names = [vs_title, hm_title, covid_title, stress_title]
|
327 |
+
|
328 |
|
329 |
# interfaces = [covid, stress]
|
330 |
# interface_names = [covid_title, stress_title]
|