Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,11 @@ with gr.Blocks() as demo:
|
|
| 73 |
|
| 74 |
with gr.Row():
|
| 75 |
txt = gr.Textbox(lines=3, label="Complaint text", value="Pothole on main road causing damage.")
|
| 76 |
-
cat = gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
with gr.Row():
|
| 79 |
complaints_in = gr.Number(value=1, label="Number of distinct complaints (integer)")
|
|
@@ -86,7 +90,7 @@ with gr.Blocks() as demo:
|
|
| 86 |
inputs=[txt, cat, complaints_in, upvotes_in],
|
| 87 |
outputs=output)
|
| 88 |
|
| 89 |
-
#
|
| 90 |
demo.load(
|
| 91 |
lambda: handle_complaint(
|
| 92 |
"Water pipeline leakage near market area.",
|
|
|
|
| 73 |
|
| 74 |
with gr.Row():
|
| 75 |
txt = gr.Textbox(lines=3, label="Complaint text", value="Pothole on main road causing damage.")
|
| 76 |
+
cat = gr.Dropdown(
|
| 77 |
+
choices=["water", "electricity", "gas", "road", "garbage"],
|
| 78 |
+
value="road",
|
| 79 |
+
label="Category"
|
| 80 |
+
)
|
| 81 |
|
| 82 |
with gr.Row():
|
| 83 |
complaints_in = gr.Number(value=1, label="Number of distinct complaints (integer)")
|
|
|
|
| 90 |
inputs=[txt, cat, complaints_in, upvotes_in],
|
| 91 |
outputs=output)
|
| 92 |
|
| 93 |
+
# Example load
|
| 94 |
demo.load(
|
| 95 |
lambda: handle_complaint(
|
| 96 |
"Water pipeline leakage near market area.",
|