EzekielMW commited on
Commit
7eff709
·
verified ·
1 Parent(s): 1c0c1dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -35
app.py CHANGED
@@ -309,42 +309,54 @@ 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("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("""
327
- ### 👨‍🌾 Farmers
328
- - Quick, non-destructive testing of milk quality.
329
- - Early detection of spoilage or adulteration.
330
- - Enables fairer pricing in cooperative and market setups.
331
-
332
- ### 🏧 Government
333
- - Strengthens food safety monitoring.
334
- - Ensures consistent quality across the supply chain.
335
- - Fosters innovation in rural/agricultural tech.
336
-
337
- ### 🏢 Businesses & Cooperatives
338
- - Real-time quality control in logistics.
339
- - Cost-effective compared to traditional labs.
340
- - Enhances trust through transparency.
341
-
342
- ---
343
-
344
- ### 💡 Final Note on Healthy Living
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
 
 
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("Models"):
313
+ with gr.Tabs():
314
+ with gr.Tab("Random Forest"):
315
+ gr.Image(value="rf.png", label="Random Forest Output")
316
+
317
+ with gr.Tab("Decision Tree"):
318
+ gr.Markdown("**Confusion Matrix**")
319
+ gr.Image(value="tree_cm.png", label="Confusion Matrix")
320
+ gr.Markdown("**Decision Tree Visualization**")
321
+ gr.Image(value="tree.png", label="Tree Structure")
322
+
323
+ with gr.Tab("1D CNN (Raw Data)"):
324
+ gr.Image(value="1d.png", label="1D CNN Output")
325
+
326
  with gr.Tab("Takeaways"):
327
+ gr.Markdown("## 🌿 Why Spectroscopy Matters in the Dairy Ecosystem")
328
+
329
+ gr.Markdown("### 👨‍🌾 Farmers")
330
+ gr.Markdown("""
331
+ - ✅ Enables **quick, non-destructive testing** of milk quality at the source.
332
+ - ⚠️ Allows **early detection** of spoilage, contamination, or adulteration.
333
+ - 💰 Supports **transparent and fair pricing** in cooperative and local markets.
334
+ """)
335
+
336
+ gr.Markdown("### 🏛️ Government & Regulators")
337
  gr.Markdown("""
338
+ - 🛡️ Reinforces **food safety and public health** monitoring systems.
339
+ - 📊 Ensures **consistency and traceability** across the dairy supply chain.
340
+ - 🚀 Encourages **innovation in agricultural technologies** and rural development.
341
+ """)
342
+
343
+ gr.Markdown("### 🏭 Businesses & Cooperatives")
344
+ gr.Markdown("""
345
+ - ⏱️ Facilitates **real-time quality control** during production and logistics.
346
+ - 💡 Reduces dependency on slow, expensive lab tests.
347
+ - 🤝 Builds **consumer trust** through transparency and quality assurance.
348
+ """)
349
+
350
+ gr.Markdown("---")
351
+ gr.Markdown("## 🧬 Parting Thought: Healthy Living Starts with Smart Choices")
352
+ gr.Markdown("""
353
+ > “Milk is nature’s first food – and spectroscopy helps us keep it honest, pure, and nutritious.”
354
+ >
355
+ > Embrace technology. Protect health.
356
+ > Let's make every drop of milk safe and reliable for everyone.
357
+ """)
358
+
359
+ demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
360
+
361
 
362