egecandrsn commited on
Commit
a29a3f3
β€’
1 Parent(s): 2aa4b3f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -3
README.md CHANGED
@@ -1,13 +1,63 @@
1
  ---
2
  title: WeatherApp.v1
3
- emoji: πŸ“š
4
  colorFrom: purple
5
- colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 3.28.0
8
  app_file: app.py
9
  pinned: false
10
  license: unknown
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: WeatherApp.v1
3
+ emoji: 🌍
4
  colorFrom: purple
5
+ colorTo: red
6
  sdk: gradio
7
+ sdk_version: 3.27.0
8
  app_file: app.py
9
  pinned: false
10
  license: unknown
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
+ # Weather Prediction Model Based on User Preferences
15
+
16
+
17
+ This is a machine learning model that predicts the suitability of the weather based on user preferences. The model takes into account various weather features and scores each day based on how well it matches the user's ideal weather conditions.
18
+
19
+
20
+ ## Features
21
+
22
+ - Trains a machine learning model based on the user's ideal weather conditions
23
+ - Predicts the suitability of the weather on a given day and location
24
+ - Provides hourly scores for the day's weather
25
+
26
+ ## Requirements
27
+
28
+ - pandas
29
+ - numpy
30
+ - scikit-learn
31
+ - pickle
32
+ - datetime
33
+ - tensorflow
34
+ - json
35
+ - requests
36
+ - gradio
37
+
38
+ To install the requirements, run:
39
+
40
+ ```bash
41
+ pip install pandas numpy scikit-learn tensorflow json requests gradio
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ 1. Train the model by providing your ideal max temperature, min temperature, and humidity level.
47
+ 2. Predict the weather for a given location and day (yesterday, today, or tomorrow) using the trained model.
48
+ 3. Receive a daily score and hourly scores for the selected day based on your preferences.
49
+
50
+ ## Data
51
+
52
+ The historical weather data is stored in `weatherdatafinal.csv`. The program uses the Visual Crossing Weather API to fetch real-time weather data for the specified location and day.
53
+
54
+ ## Functions
55
+
56
+ - `add_daytime_column()`: Adds a daytime column to the dataset by calculating the duration between sunrise and sunset.
57
+ - `train_model()`: Trains the model based on user preferences for ideal max temperature, ideal min temperature, and ideal humidity.
58
+ - `predict_weather()`: Predicts the daily score for the specified location and day based on the trained model.
59
+ - `main()`: Defines the Gradio interface and launches the application.
60
+
61
+ ## Author
62
+
63
+ @egecandrsn