shivakumar2005 commited on
Commit
34d428f
·
verified ·
1 Parent(s): aac3b88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
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
- LEADERBOARD_FILE = "/content/road2success_leaderboard.json"
 
 
 
 
8
  if not os.path.exists(LEADERBOARD_FILE):
9
  with open(LEADERBOARD_FILE, "w") as f:
10
- json.dump({"scores": []}, f)
 
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():