Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,7 +147,7 @@ def predict_single_text(text):
|
|
| 147 |
# barmode='stack',
|
| 148 |
template='seaborn', font=dict(family="Arial", size=12, color="black"),
|
| 149 |
autosize=True,
|
| 150 |
-
width=
|
| 151 |
height=500,
|
| 152 |
xaxis_title="Likelihood of IEQ",
|
| 153 |
yaxis_title="Indoor environmental quality (IEQ)",
|
|
@@ -163,7 +163,7 @@ def predict_single_text(text):
|
|
| 163 |
# Create Gradio interface for single text
|
| 164 |
iface2 = gr.Interface(fn=predict_single_text,
|
| 165 |
inputs=gr.Textbox(lines=7, label="Paste or type text here"),
|
| 166 |
-
outputs=[gr.Label(label="Top
|
| 167 |
gr.Plot(label="Likelihood of all labels", show_label=True)],
|
| 168 |
title="Single Text Prediction",
|
| 169 |
article="**Note:** The quality of model predictions may depend on the quality of information provided."
|
|
@@ -346,7 +346,7 @@ def predict_from_csv(file, column_name, progress=gr.Progress()):
|
|
| 346 |
# fig.update_yaxes(tickangle=0, tickfont=dict(family='Arial', color='black', size=12))
|
| 347 |
# fig.update_annotations(font_size=12)
|
| 348 |
|
| 349 |
-
return output_csv
|
| 350 |
|
| 351 |
|
| 352 |
# Define the input component
|
|
|
|
| 147 |
# barmode='stack',
|
| 148 |
template='seaborn', font=dict(family="Arial", size=12, color="black"),
|
| 149 |
autosize=True,
|
| 150 |
+
width=600,
|
| 151 |
height=500,
|
| 152 |
xaxis_title="Likelihood of IEQ",
|
| 153 |
yaxis_title="Indoor environmental quality (IEQ)",
|
|
|
|
| 163 |
# Create Gradio interface for single text
|
| 164 |
iface2 = gr.Interface(fn=predict_single_text,
|
| 165 |
inputs=gr.Textbox(lines=7, label="Paste or type text here"),
|
| 166 |
+
outputs=[gr.Label(label="Top Predictions", show_label=True),
|
| 167 |
gr.Plot(label="Likelihood of all labels", show_label=True)],
|
| 168 |
title="Single Text Prediction",
|
| 169 |
article="**Note:** The quality of model predictions may depend on the quality of information provided."
|
|
|
|
| 346 |
# fig.update_yaxes(tickangle=0, tickfont=dict(family='Arial', color='black', size=12))
|
| 347 |
# fig.update_annotations(font_size=12)
|
| 348 |
|
| 349 |
+
return output_csv
|
| 350 |
|
| 351 |
|
| 352 |
# Define the input component
|