Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -55,12 +55,15 @@ cons_tuned_svr, _, _, _, _ = sample_model(data, SVR(C=3, kernel="rbf", tol=0.001
|
|
55 |
|
56 |
|
57 |
with gr.Blocks() as demo:
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
65 |
|
66 |
demo.launch()
|
|
|
55 |
|
56 |
|
57 |
with gr.Blocks() as demo:
|
58 |
+
gr.Markdown("# AIN311 Project P05 - MOOC Recommendation")
|
59 |
+
gr.Markdown("## Generating a Rating from User Comment")
|
60 |
+
with gr.Column():
|
61 |
+
comment = gr.Textbox(label="Thanks for your interest and taking your time.\n"+
|
62 |
+
"Tell us about your personal experience enrolling in this course. Was it the right match for you?\n"+
|
63 |
+
"(Note: Comment should be written in English and be longer than 20 characters)\n")
|
64 |
+
button = gr.Button("What is the Rating I Gave? Click me to Learn")
|
65 |
+
comment_scores = gr.Textbox(label="Sentiment Scores of Your Comment")
|
66 |
+
rating = gr.Textbox(label="Generated Rating from Your Comment")
|
67 |
+
button.click(fn=take_input, inputs=comment, outputs=[comment_scores, rating])
|
68 |
|
69 |
demo.launch()
|