Spaces:
Runtime error
Runtime error
Commit
·
8703aac
1
Parent(s):
f46b79e
Update app.py
Browse files
app.py
CHANGED
@@ -27,16 +27,14 @@ def generate_advice(prompt):
|
|
27 |
advice = dataset["train"][predicted_label_id]["text"]
|
28 |
return advice
|
29 |
|
30 |
-
# Create
|
31 |
iface = gr.Interface(
|
32 |
-
fn=
|
33 |
-
inputs=
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
outputs=gr.Textbox(placeholder="Answer"),
|
39 |
-
live=True
|
40 |
)
|
41 |
|
42 |
# Launch the Gradio interface
|
|
|
27 |
advice = dataset["train"][predicted_label_id]["text"]
|
28 |
return advice
|
29 |
|
30 |
+
# Create the Gradio interface
|
31 |
iface = gr.Interface(
|
32 |
+
fn=generate_advice,
|
33 |
+
inputs=gr.Textbox(),
|
34 |
+
outputs=gr.Textbox(),
|
35 |
+
live=True,
|
36 |
+
title="Depression Advice Generator",
|
37 |
+
description="Enter your feelings, and get supportive advice generated by a fine-tuned BERT model.",
|
|
|
|
|
38 |
)
|
39 |
|
40 |
# Launch the Gradio interface
|