EzekielMW commited on
Commit
40ff2e9
·
verified ·
1 Parent(s): a01d3d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -28
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("# 🧪 SPECTROSCOPY-YOUR HEALTH OUR CONCERN!!!")
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
- ### 👨‍🌾 Farmers
368
- - Enables quick and non-destructive testing of milk quality.
369
- - Helps identify adulteration or spoilage early.
370
- - Boosts credibility and fair pricing in local and export markets.
371
-
372
- ### 🏛️ Government
373
- - Supports enforcement of food safety and regulatory standards.
374
- - Aids in surveillance of quality at collection centers and cooperatives.
375
- - Encourages investment in agri-tech and rural innovation.
376
-
377
- ### 🏢 Businesses & Cooperatives
378
- - Enhances supply chain quality control.
379
- - Reduces reliance on expensive lab-based testing.
380
- - Increases transparency and trust with consumers.
381
-
382
- ### 🧠 Why Spectroscopy?
383
- - Non-invasive, fast, and cost-effective.
384
- - Adaptable for large-scale or smallholder use.
385
- - Unlocks new value in digitizing dairy analytics.
386
-
387
- ---
388
-
389
- ### 💡 Parting Shot: Health Starts With What You Consume
390
- > “Milk is nature’s first food – and it should remain pure. Spectroscopy empowers us to ensure it stays that way.”
391
- Stay curious. Stay healthy.
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)