Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -298,7 +298,7 @@ with torch.no_grad():
|
|
| 298 |
train_acc = (train_preds == torch.tensor(y_train_raw)).float().mean().item()
|
| 299 |
|
| 300 |
with gr.Blocks() as demo:
|
| 301 |
-
gr.Markdown("# 🧪
|
| 302 |
|
| 303 |
with gr.Tabs():
|
| 304 |
with gr.Tab("Preview Raw Data"):
|
|
@@ -309,6 +309,18 @@ with gr.Blocks() as demo:
|
|
| 309 |
out_gallery = [gr.Plot() for _ in range(8)]
|
| 310 |
plot_button.click(fn=plot_all, inputs=[], outputs=out_gallery)
|
| 311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
with gr.Tab("Takeaways"):
|
| 313 |
gr.Markdown("## 🌾 Spectroscopy: Transforming the Dairy Sector")
|
| 314 |
gr.Markdown("""
|
|
@@ -333,20 +345,6 @@ with gr.Blocks() as demo:
|
|
| 333 |
> “Milk is nature’s first food – and it should remain pure. Spectroscopy empowers us to ensure it stays that way.”
|
| 334 |
Stay curious. Stay healthy.
|
| 335 |
""")
|
| 336 |
-
|
| 337 |
-
with gr.Tab("Random Forest"):
|
| 338 |
-
gr.Image(value="rf.png", label="Random Forest Output")
|
| 339 |
-
|
| 340 |
-
with gr.Tab("Decision Tree"):
|
| 341 |
-
gr.Markdown("**Confusion Matrix**")
|
| 342 |
-
gr.Image(value="tree_cm.png", label="Confusion Matrix")
|
| 343 |
-
gr.Markdown("**Decision Tree Visualization**")
|
| 344 |
-
gr.Image(value="tree.png", label="Tree Structure")
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
with gr.Tab("1D CNN (Raw Data)"):
|
| 348 |
-
gr.Image(value="1d.png", label="1D CNN Output")
|
| 349 |
-
|
| 350 |
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
|
| 351 |
|
| 352 |
|
|
|
|
| 298 |
train_acc = (train_preds == torch.tensor(y_train_raw)).float().mean().item()
|
| 299 |
|
| 300 |
with gr.Blocks() as demo:
|
| 301 |
+
gr.Markdown("# 🧪 SPECTROSCOPY - YOUR HEALTH OUR CONCERN!!!")
|
| 302 |
|
| 303 |
with gr.Tabs():
|
| 304 |
with gr.Tab("Preview Raw Data"):
|
|
|
|
| 309 |
out_gallery = [gr.Plot() for _ in range(8)]
|
| 310 |
plot_button.click(fn=plot_all, inputs=[], outputs=out_gallery)
|
| 311 |
|
| 312 |
+
with gr.Tab("Random Forest"):
|
| 313 |
+
gr.Image(value="rf.png", label="Random Forest Output")
|
| 314 |
+
|
| 315 |
+
with gr.Tab("Decision Tree"):
|
| 316 |
+
gr.Markdown("**Confusion Matrix**")
|
| 317 |
+
gr.Image(value="tree_cm.png", label="Confusion Matrix")
|
| 318 |
+
gr.Markdown("**Decision Tree Visualization**")
|
| 319 |
+
gr.Image(value="tree.png", label="Tree Structure")
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
with gr.Tab("1D CNN (Raw Data)"):
|
| 323 |
+
gr.Image(value="1d.png", label="1D CNN Output")
|
| 324 |
with gr.Tab("Takeaways"):
|
| 325 |
gr.Markdown("## 🌾 Spectroscopy: Transforming the Dairy Sector")
|
| 326 |
gr.Markdown("""
|
|
|
|
| 345 |
> “Milk is nature’s first food – and it should remain pure. Spectroscopy empowers us to ensure it stays that way.”
|
| 346 |
Stay curious. Stay healthy.
|
| 347 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
|
| 349 |
|
| 350 |
|