Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,18 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
import requests, json, os, datetime
|
| 4 |
from bs4 import BeautifulSoup
|
| 5 |
from transformers import pipeline
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
if not os.path.exists(LEADERBOARD_FILE):
|
| 9 |
with open(LEADERBOARD_FILE, "w") as f:
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
_gen = None
|
| 13 |
def get_generator():
|
|
|
|
| 1 |
+
import os
|
| 2 |
import gradio as gr
|
| 3 |
import requests, json, os, datetime
|
| 4 |
from bs4 import BeautifulSoup
|
| 5 |
from transformers import pipeline
|
| 6 |
|
| 7 |
+
|
| 8 |
+
# Store the leaderboard file in the current working directory
|
| 9 |
+
LEADERBOARD_FILE = "road2success_leaderboard.json"
|
| 10 |
+
|
| 11 |
+
# Create the file if it doesn't exist
|
| 12 |
if not os.path.exists(LEADERBOARD_FILE):
|
| 13 |
with open(LEADERBOARD_FILE, "w") as f:
|
| 14 |
+
f.write("[]") # start with an empty JSON array
|
| 15 |
+
|
| 16 |
|
| 17 |
_gen = None
|
| 18 |
def get_generator():
|