ogegadavis254 commited on
Commit
0c48822
1 Parent(s): 9f08dba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import requests
3
  import os
4
  import json
5
  import pandas as pd
 
6
  import matplotlib.pyplot as plt
7
 
8
  # Function to call the Together AI model
@@ -61,7 +62,49 @@ if st.button("Generate Prediction"):
61
  )
62
 
63
  try:
64
- with st.spinner("Analyzing climate conditions... Generating predictions... Preparing visualizations..."):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  response = call_ai_model(all_message)
66
 
67
  generated_text = ""
 
3
  import os
4
  import json
5
  import pandas as pd
6
+ import time
7
  import matplotlib.pyplot as plt
8
 
9
  # Function to call the Together AI model
 
62
  )
63
 
64
  try:
65
+ placeholder = st.empty()
66
+
67
+ with placeholder.container():
68
+ st.info("Collecting climate data...")
69
+ time.sleep(1)
70
+ placeholder.empty()
71
+
72
+ with placeholder.container():
73
+ st.info("Analyzing temperature data...")
74
+ time.sleep(1)
75
+ placeholder.empty()
76
+
77
+ with placeholder.container():
78
+ st.info("Evaluating humidity levels...")
79
+ time.sleep(1)
80
+ placeholder.empty()
81
+
82
+ with placeholder.container():
83
+ st.info("Assessing wind conditions...")
84
+ time.sleep(1)
85
+ placeholder.empty()
86
+
87
+ with placeholder.container():
88
+ st.info("Checking UV index...")
89
+ time.sleep(1)
90
+ placeholder.empty()
91
+
92
+ with placeholder.container():
93
+ st.info("Measuring air quality...")
94
+ time.sleep(1)
95
+ placeholder.empty()
96
+
97
+ with placeholder.container():
98
+ st.info("Calculating precipitation effects...")
99
+ time.sleep(1)
100
+ placeholder.empty()
101
+
102
+ with placeholder.container():
103
+ st.info("Analyzing atmospheric pressure...")
104
+ time.sleep(1)
105
+ placeholder.empty()
106
+
107
+ with st.spinner("Finalizing predictions..."):
108
  response = call_ai_model(all_message)
109
 
110
  generated_text = ""