Nguyen Thai Thao Uyen commited on
Commit
8d22280
·
1 Parent(s): 9e43181
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -53,7 +53,8 @@ def server(input: Inputs, output: Outputs, session: Session):
53
  # print(x)
54
  # return img
55
  # return None
56
-
 
57
  @render.plot
58
  def plot():
59
  if input.image_input():
@@ -79,9 +80,10 @@ def server(input: Inputs, output: Outputs, session: Session):
79
  ax.set_xticklabels([])
80
  ax.set_yticklabels([])
81
  else:
 
82
  fig, _ = plt.subplots() # Create an empty figure if no image received
83
  fig.text(0.5, 0.5, "No image received", ha='center', va='center', fontsize=14)
84
- print("no image received")
85
  return fig
86
 
87
 
 
53
  # print(x)
54
  # return img
55
  # return None
56
+
57
+ @output
58
  @render.plot
59
  def plot():
60
  if input.image_input():
 
80
  ax.set_xticklabels([])
81
  ax.set_yticklabels([])
82
  else:
83
+ print("no image received")
84
  fig, _ = plt.subplots() # Create an empty figure if no image received
85
  fig.text(0.5, 0.5, "No image received", ha='center', va='center', fontsize=14)
86
+
87
  return fig
88
 
89