Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,13 +52,11 @@ def take_input(model):
|
|
52 |
"(Note: Comment should be written in English and be longer than 20 characters)\n")
|
53 |
if (detect(comment) != "en") or (len(comment) < 20):
|
54 |
print("Sorry, your comment does not meet the requirements.\n")
|
55 |
-
take_input(model)
|
56 |
else:
|
57 |
user_interaction(comment, model)
|
58 |
|
59 |
cons_tuned_svr, _, _, _, _ = sample_model(data, SVR(C=3, kernel="rbf", tol=0.001))
|
60 |
|
61 |
|
62 |
-
|
63 |
-
iface = gr.Interface(fn=take_input(cons_tuned_svr), inputs="text", outputs="text")
|
64 |
iface.launch()
|
|
|
52 |
"(Note: Comment should be written in English and be longer than 20 characters)\n")
|
53 |
if (detect(comment) != "en") or (len(comment) < 20):
|
54 |
print("Sorry, your comment does not meet the requirements.\n")
|
|
|
55 |
else:
|
56 |
user_interaction(comment, model)
|
57 |
|
58 |
cons_tuned_svr, _, _, _, _ = sample_model(data, SVR(C=3, kernel="rbf", tol=0.001))
|
59 |
|
60 |
|
61 |
+
iface = gr.Interface(fn=take_input, inputs=gr.Textbox(lines=2, placeholder="Write your comment here..."),, outputs="text")
|
|
|
62 |
iface.launch()
|