Spaces:
Runtime error
Runtime error
Commit
·
bd095fd
1
Parent(s):
5d4d8a5
feat: Add default value to input textbox
Browse files
app.py
CHANGED
|
@@ -172,10 +172,15 @@ dropdown = gr.inputs.Dropdown(
|
|
| 172 |
default="Sentiment classification",
|
| 173 |
)
|
| 174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
# Create the interface, where the function depends on the task chosen
|
| 176 |
interface = gr.Interface(
|
| 177 |
fn=classification,
|
| 178 |
-
inputs=[dropdown,
|
| 179 |
outputs=gr.outputs.Label(type="text"),
|
| 180 |
title="Scandinavian zero-shot text classification",
|
| 181 |
description=DESCRIPTION,
|
|
|
|
| 172 |
default="Sentiment classification",
|
| 173 |
)
|
| 174 |
|
| 175 |
+
# Create a text box for the input text
|
| 176 |
+
input_textbox = gr.inputs.Textbox(
|
| 177 |
+
label="Text", default="Jeg er helt vild med fodbolden 😊"
|
| 178 |
+
)
|
| 179 |
+
|
| 180 |
# Create the interface, where the function depends on the task chosen
|
| 181 |
interface = gr.Interface(
|
| 182 |
fn=classification,
|
| 183 |
+
inputs=[dropdown, input_textbox],
|
| 184 |
outputs=gr.outputs.Label(type="text"),
|
| 185 |
title="Scandinavian zero-shot text classification",
|
| 186 |
description=DESCRIPTION,
|