Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,22 @@
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import matplotlib.pyplot as plt
|
|
|
4 |
|
5 |
-
# Load the
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
# Function to search for farm performance
|
12 |
def search_farm(farm_name):
|
@@ -76,3 +86,4 @@ elif menu == "پیش بینی عملکرد":
|
|
76 |
|
77 |
if st.button("پیش بینی"):
|
78 |
predict_performance(farm_name_prediction)
|
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
import matplotlib.pyplot as plt
|
4 |
+
from datasets import load_dataset
|
5 |
|
6 |
+
# Load the dataset from Hugging Face
|
7 |
+
dataset = load_dataset('Esmaeilkianii/croplogdehkhoda', split='train')
|
8 |
+
data = pd.DataFrame(dataset)
|
9 |
+
|
10 |
+
# Split the data into different sections based on columns or logic
|
11 |
+
# Assuming the dataset contains the combined information for all four files
|
12 |
+
|
13 |
+
# Separate different sections of the data
|
14 |
+
cleaned_data = data[['مزرعه', 'year', 'yield', 'age', 'variety', 'area']] # Example farm performance data
|
15 |
+
veg_index_data = data[['مزرعه', 'date', 'mean_VH', 'mean_VV']] # Example vegetation index data
|
16 |
+
weather_data = data[['سال', 'ماه', 'روز', 'تاریخ', 'درجه حرارت حداقل', 'درجه حرارت حداکثر', 'میانگین درجه حرارت',
|
17 |
+
'حداقل رطوبت نسبی (درصد)', 'حداکثر رطوبت نسبی (درصد)', 'میانگین رطوبت نسبی (درصد)',
|
18 |
+
'میزان تبخیر روزانه (میلیمتر)', 'میزان بارندگی (میلیمتر)', 'میزان ساعت افتابی']] # Weather data
|
19 |
+
performance_estimation_data = data[['مزرعه', 'yield', 'tonnage']] # Example yield and tonnage prediction
|
20 |
|
21 |
# Function to search for farm performance
|
22 |
def search_farm(farm_name):
|
|
|
86 |
|
87 |
if st.button("پیش بینی"):
|
88 |
predict_performance(farm_name_prediction)
|
89 |
+
|