Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -643,6 +643,18 @@ async def update_hub_stats():
|
|
643 |
discussions = data["numDiscussions"]
|
644 |
papers = data["numPapers"]
|
645 |
upvotes = data["numUpvotes"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
646 |
|
647 |
#sheet1.update(f'I{i+1}:O{i+1}',[[likes, models, datasets, spaces, discussions, papers, upvotes]])
|
648 |
# update df instead
|
|
|
643 |
discussions = data["numDiscussions"]
|
644 |
papers = data["numPapers"]
|
645 |
upvotes = data["numUpvotes"]
|
646 |
+
|
647 |
+
try:
|
648 |
+
global_df.loc[index, 'likes'] = likes
|
649 |
+
global_df.loc[index, 'models'] = models
|
650 |
+
global_df.loc[index, 'datasets'] = datasets
|
651 |
+
global_df.loc[index, 'spaces'] = spaces
|
652 |
+
global_df.loc[index, 'discussions'] = discussions
|
653 |
+
global_df.loc[index, 'papers'] = papers
|
654 |
+
global_df.loc[index, 'upvotes'] = upvotes
|
655 |
+
except Exception as e:
|
656 |
+
print(f"{e} error updating the dataframe")
|
657 |
+
|
658 |
|
659 |
#sheet1.update(f'I{i+1}:O{i+1}',[[likes, models, datasets, spaces, discussions, papers, upvotes]])
|
660 |
# update df instead
|