Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,12 +16,14 @@ def sar_alert(MESSAGE, API_KEY):
|
|
| 16 |
#
|
| 17 |
pprint.pprint(output_data)
|
| 18 |
df_response = pd.json_normalize(output_data)
|
|
|
|
| 19 |
return df_response, str(output_data)
|
| 20 |
|
| 21 |
iface = gr.Interface(
|
| 22 |
fn=sar_alert,
|
| 23 |
inputs=["text", "text"],
|
| 24 |
-
outputs=[gr.outputs.Dataframe(
|
|
|
|
| 25 |
)
|
| 26 |
|
| 27 |
iface.launch()
|
|
|
|
| 16 |
#
|
| 17 |
pprint.pprint(output_data)
|
| 18 |
df_response = pd.json_normalize(output_data)
|
| 19 |
+
df_response = df_response['output.SAR_requested', 'output.explanation']
|
| 20 |
return df_response, str(output_data)
|
| 21 |
|
| 22 |
iface = gr.Interface(
|
| 23 |
fn=sar_alert,
|
| 24 |
inputs=["text", "text"],
|
| 25 |
+
outputs=[gr.outputs.Dataframe(headers=['SAR_Requested', 'Explanation'], type='pandas'),
|
| 26 |
+
"text"]
|
| 27 |
)
|
| 28 |
|
| 29 |
iface.launch()
|