Spaces:
Sleeping
Sleeping
add app
Browse files
app.py
CHANGED
@@ -45,8 +45,10 @@ def predict(model_name, text):
|
|
45 |
return_all_scores=True,
|
46 |
function_to_apply='sigmoid'
|
47 |
)
|
|
|
|
|
48 |
|
49 |
-
return
|
50 |
|
51 |
if __name__ == '__main__':
|
52 |
exam1 = 'κ²½κΈ°λ μ±λ¨μ μμ ꡬ νν3λμ μ°λ¦¬ λλ€μΌ!'
|
@@ -61,7 +63,8 @@ if __name__ == '__main__':
|
|
61 |
#Create a gradio app with a button that calls predict()
|
62 |
app = gr.Interface(
|
63 |
fn=predict,
|
64 |
-
inputs=[gr.inputs.Dropdown(model_name_list, label="Model Name"), 'text'],
|
|
|
65 |
examples = [
|
66 |
[MODEL_BUF["name"], exam1],
|
67 |
[MODEL_BUF["name"], exam2],
|
|
|
45 |
return_all_scores=True,
|
46 |
function_to_apply='sigmoid'
|
47 |
)
|
48 |
+
for i in pipe(text)[0]:
|
49 |
+
output = output+ '\t'
|
50 |
|
51 |
+
return output
|
52 |
|
53 |
if __name__ == '__main__':
|
54 |
exam1 = 'κ²½κΈ°λ μ±λ¨μ μμ ꡬ νν3λμ μ°λ¦¬ λλ€μΌ!'
|
|
|
63 |
#Create a gradio app with a button that calls predict()
|
64 |
app = gr.Interface(
|
65 |
fn=predict,
|
66 |
+
inputs=[gr.inputs.Dropdown(model_name_list, label="Model Name"), 'text'],
|
67 |
+
outputs='text',
|
68 |
examples = [
|
69 |
[MODEL_BUF["name"], exam1],
|
70 |
[MODEL_BUF["name"], exam2],
|