Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -233,7 +233,7 @@ def get_picture_from_url(url):
|
|
233 |
return None
|
234 |
|
235 |
def get_top_category():
|
236 |
-
topCategory = pd.read_csv(
|
237 |
# Sort the DataFrame in ascending order based on predicted_prob column
|
238 |
topCategory_sorted = topCategory.sort_values('predicted_prob')
|
239 |
|
@@ -270,7 +270,7 @@ def show_best_category():
|
|
270 |
st.write(f"<span style='color:{color};font-weight:bold;'>{category_id}</span>", unsafe_allow_html=True)
|
271 |
|
272 |
def get_top_duration():
|
273 |
-
topDurationsorted = pd.read_csv(
|
274 |
topDurationsorted = topDurationsorted.sort_values('predicted_prob', ascending=False)
|
275 |
return topDurationsorted
|
276 |
|
@@ -299,7 +299,7 @@ def show_best_duration():
|
|
299 |
st.write(f"<span style='color:{color};font-weight:bold;'>{range}</span>", unsafe_allow_html=True)
|
300 |
|
301 |
def get_top_title():
|
302 |
-
topTitle = pd.read_csv(
|
303 |
# Sort the DataFrame in ascending order based on predicted_prob column
|
304 |
topTitle_sorted = topTitle.sort_values('Importance Score', ascending=False)
|
305 |
return topTitle_sorted
|
@@ -330,7 +330,7 @@ def round_interval(interval_str):
|
|
330 |
return f"({int(start)}, {int(end)})"
|
331 |
|
332 |
def get_top_titleLength():
|
333 |
-
topTitleLength = pd.read_csv(
|
334 |
title_length_ranges = topTitleLength['titleLength']
|
335 |
predicted_probs = topTitleLength['predicted_prob']
|
336 |
rounded_ranges = [round_interval(range_val) for range_val in title_length_ranges]
|
|
|
233 |
return None
|
234 |
|
235 |
def get_top_category():
|
236 |
+
topCategory = pd.read_csv('topCategory.csv')
|
237 |
# Sort the DataFrame in ascending order based on predicted_prob column
|
238 |
topCategory_sorted = topCategory.sort_values('predicted_prob')
|
239 |
|
|
|
270 |
st.write(f"<span style='color:{color};font-weight:bold;'>{category_id}</span>", unsafe_allow_html=True)
|
271 |
|
272 |
def get_top_duration():
|
273 |
+
topDurationsorted = pd.read_csv('topDuration.csv')
|
274 |
topDurationsorted = topDurationsorted.sort_values('predicted_prob', ascending=False)
|
275 |
return topDurationsorted
|
276 |
|
|
|
299 |
st.write(f"<span style='color:{color};font-weight:bold;'>{range}</span>", unsafe_allow_html=True)
|
300 |
|
301 |
def get_top_title():
|
302 |
+
topTitle = pd.read_csv('topTitle.csv')
|
303 |
# Sort the DataFrame in ascending order based on predicted_prob column
|
304 |
topTitle_sorted = topTitle.sort_values('Importance Score', ascending=False)
|
305 |
return topTitle_sorted
|
|
|
330 |
return f"({int(start)}, {int(end)})"
|
331 |
|
332 |
def get_top_titleLength():
|
333 |
+
topTitleLength = pd.read_csv('topTitleLength.csv')
|
334 |
title_length_ranges = topTitleLength['titleLength']
|
335 |
predicted_probs = topTitleLength['predicted_prob']
|
336 |
rounded_ranges = [round_interval(range_val) for range_val in title_length_ranges]
|