Matiullah00999 commited on
Commit
d3c123f
·
verified ·
1 Parent(s): 7ca596a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -194,7 +194,7 @@ def analyze(image):
194
  summary += f"- Avg Inter-Aggregate Distance: `{np.mean(edge_lengths):.2f}` mm\n"
195
  summary += f"- Max Inter-Aggregate Distance: `{np.max(edge_lengths):.2f}` mm\n"
196
 
197
- return img1, img2, img3, summary
198
 
199
  demo = gr.Interface(
200
  fn=analyze,
@@ -203,10 +203,10 @@ demo = gr.Interface(
203
  gr.Image(label="Boundary & Calibration Line"),
204
  gr.Image(label="Feret Rectangles"),
205
  gr.Image(label="Delaunay Triangulation"),
206
- gr.Markdown(label="Measurements Summary"),
207
  ],
208
  title="Concrete Aggregate Analysis App",
209
- description="Upload a concrete image. The model will segment aggregates and analyze their distribution and shape.",
210
  )
211
 
212
  if __name__ == "__main__":
 
194
  summary += f"- Avg Inter-Aggregate Distance: `{np.mean(edge_lengths):.2f}` mm\n"
195
  summary += f"- Max Inter-Aggregate Distance: `{np.max(edge_lengths):.2f}` mm\n"
196
 
197
+ return img1, img2, img3, gr.Textbox.update(value=summary)
198
 
199
  demo = gr.Interface(
200
  fn=analyze,
 
203
  gr.Image(label="Boundary & Calibration Line"),
204
  gr.Image(label="Feret Rectangles"),
205
  gr.Image(label="Delaunay Triangulation"),
206
+ gr.Textbox(label="Measurements Summary")
207
  ],
208
  title="Concrete Aggregate Analysis App",
209
+ description="Upload a concrete image. The model will segment aggregates and analyze their distribution and shape."
210
  )
211
 
212
  if __name__ == "__main__":