Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -231,7 +231,6 @@ def plot_all():
|
|
| 231 |
|
| 232 |
return plots
|
| 233 |
|
| 234 |
-
|
| 235 |
# ---------- Prepare Data for Modeling ----------
|
| 236 |
X = df.iloc[:, 1:].values
|
| 237 |
scaler = StandardScaler()
|
|
@@ -300,7 +299,7 @@ for epoch in range(1, 11):
|
|
| 300 |
|
| 301 |
# ---------- Gradio Interface ----------
|
| 302 |
with gr.Blocks() as demo:
|
| 303 |
-
gr.Markdown("# 🧪
|
| 304 |
with gr.Tabs():
|
| 305 |
with gr.Tab("Preview Raw Data"):
|
| 306 |
gr.DataFrame(df.head(50), label="Preview of Raw Data")
|
|
@@ -361,35 +360,37 @@ with gr.Blocks() as demo:
|
|
| 361 |
|
| 362 |
predict_btn = gr.Button("Predict")
|
| 363 |
predict_btn.click(fn=predict, inputs=[input_file, model_dropdown], outputs=[output_df])
|
|
|
|
| 364 |
with gr.Tab("Takeaways"):
|
| 365 |
gr.Markdown("## 🌾 Spectroscopy: Transforming the Dairy Sector")
|
|
|
|
| 366 |
gr.Markdown("""
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
|
| 394 |
# Run app
|
| 395 |
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
|
|
|
|
| 231 |
|
| 232 |
return plots
|
| 233 |
|
|
|
|
| 234 |
# ---------- Prepare Data for Modeling ----------
|
| 235 |
X = df.iloc[:, 1:].values
|
| 236 |
scaler = StandardScaler()
|
|
|
|
| 299 |
|
| 300 |
# ---------- Gradio Interface ----------
|
| 301 |
with gr.Blocks() as demo:
|
| 302 |
+
gr.Markdown("# 🧪 Dataset Description")
|
| 303 |
with gr.Tabs():
|
| 304 |
with gr.Tab("Preview Raw Data"):
|
| 305 |
gr.DataFrame(df.head(50), label="Preview of Raw Data")
|
|
|
|
| 360 |
|
| 361 |
predict_btn = gr.Button("Predict")
|
| 362 |
predict_btn.click(fn=predict, inputs=[input_file, model_dropdown], outputs=[output_df])
|
| 363 |
+
|
| 364 |
with gr.Tab("Takeaways"):
|
| 365 |
gr.Markdown("## 🌾 Spectroscopy: Transforming the Dairy Sector")
|
| 366 |
+
|
| 367 |
gr.Markdown("""
|
| 368 |
+
### 👨🌾 Farmers
|
| 369 |
+
- Enables quick and non-destructive testing of milk quality.
|
| 370 |
+
- Helps identify adulteration or spoilage early.
|
| 371 |
+
- Boosts credibility and fair pricing in local and export markets.
|
| 372 |
+
|
| 373 |
+
### 🏧 Government
|
| 374 |
+
- Supports enforcement of food safety and regulatory standards.
|
| 375 |
+
- Aids in surveillance of quality at collection centers and cooperatives.
|
| 376 |
+
- Encourages investment in agri-tech and rural innovation.
|
| 377 |
+
|
| 378 |
+
### 🏢 Businesses & Cooperatives
|
| 379 |
+
- Enhances supply chain quality control.
|
| 380 |
+
- Reduces reliance on expensive lab-based testing.
|
| 381 |
+
- Increases transparency and trust with consumers.
|
| 382 |
+
|
| 383 |
+
### 🧠 Why Spectroscopy?
|
| 384 |
+
- Non-invasive, fast, and cost-effective.
|
| 385 |
+
- Adaptable for large-scale or smallholder use.
|
| 386 |
+
- Unlocks new value in digitizing dairy analytics.
|
| 387 |
+
|
| 388 |
+
---
|
| 389 |
+
|
| 390 |
+
### 💡 Parting Shot: Health Starts With What You Consume
|
| 391 |
+
> “Milk is nature’s first food – and it should remain pure. Spectroscopy empowers us to ensure it stays that way.”
|
| 392 |
+
Stay curious. Stay healthy.
|
| 393 |
+
""")
|
| 394 |
|
| 395 |
# Run app
|
| 396 |
demo.launch(server_name="0.0.0.0", server_port=7860, ssr_mode=False)
|