Spaces:
Build error
Build error
Nguyen Thai Thao Uyen
commited on
Commit
·
990d0b6
1
Parent(s):
8d22280
Add Plot
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
| 42 |
return img
|
| 43 |
return None
|
| 44 |
|
| 45 |
-
|
| 46 |
# @render.image
|
| 47 |
# def image_output():
|
| 48 |
# here = Path(__file__).parent
|
|
@@ -79,12 +79,14 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
| 79 |
ax.set_yticks([])
|
| 80 |
ax.set_xticklabels([])
|
| 81 |
ax.set_yticklabels([])
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
|
|
|
|
|
|
| 86 |
|
| 87 |
-
return
|
| 88 |
|
| 89 |
|
| 90 |
app = App(
|
|
|
|
| 42 |
return img
|
| 43 |
return None
|
| 44 |
|
| 45 |
+
|
| 46 |
# @render.image
|
| 47 |
# def image_output():
|
| 48 |
# here = Path(__file__).parent
|
|
|
|
| 79 |
ax.set_yticks([])
|
| 80 |
ax.set_xticklabels([])
|
| 81 |
ax.set_yticklabels([])
|
| 82 |
+
return fig
|
| 83 |
+
return None
|
| 84 |
+
# else:
|
| 85 |
+
# print("no image received")
|
| 86 |
+
# fig, _ = plt.subplots() # Create an empty figure if no image received
|
| 87 |
+
# fig.text(0.5, 0.5, "No image received", ha='center', va='center', fontsize=14)
|
| 88 |
|
| 89 |
+
# return None
|
| 90 |
|
| 91 |
|
| 92 |
app = App(
|