Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
from sentiment3d import Sentiment3D
|
| 4 |
|
|
@@ -39,18 +44,18 @@ iface = gr.Interface(
|
|
| 39 |
inputs=[gr.Textbox(lines=1, placeholder="Text for 3d sentiment..."), "state"],
|
| 40 |
outputs=[
|
| 41 |
gr.Textbox(lines=5, max_lines=5, label="Results"),
|
| 42 |
-
gr.ScatterPlot(
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
),
|
| 54 |
"state",
|
| 55 |
],
|
| 56 |
title=TITLE,
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
# import plotly.express as px
|
| 3 |
+
# df = px.data.iris()
|
| 4 |
+
# fig = px.scatter_3d(df, x='sepal_length', y='sepal_width', z='petal_width',
|
| 5 |
+
# color='species')
|
| 6 |
+
# fig.show()
|
| 7 |
import pandas as pd
|
| 8 |
from sentiment3d import Sentiment3D
|
| 9 |
|
|
|
|
| 44 |
inputs=[gr.Textbox(lines=1, placeholder="Text for 3d sentiment..."), "state"],
|
| 45 |
outputs=[
|
| 46 |
gr.Textbox(lines=5, max_lines=5, label="Results"),
|
| 47 |
+
# gr.ScatterPlot(
|
| 48 |
+
# x="valence",
|
| 49 |
+
# y="arousal",
|
| 50 |
+
# z="confidence",
|
| 51 |
+
# tooltip="text",
|
| 52 |
+
# size="words",
|
| 53 |
+
# size_legend_position="none",
|
| 54 |
+
# interactive=False,
|
| 55 |
+
# x_lim=[-1.05, 1.05],
|
| 56 |
+
# y_lim=[-1.05, 1.05],
|
| 57 |
+
# z_lim=[-1.05, 1.05],
|
| 58 |
+
# ),
|
| 59 |
"state",
|
| 60 |
],
|
| 61 |
title=TITLE,
|