Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,16 @@ import concurrent.futures
|
|
5 |
import gradio as gr
|
6 |
import datetime
|
7 |
import pandas as pd
|
|
|
|
|
|
|
8 |
|
9 |
api = HfApi()
|
10 |
fs = HfFileSystem()
|
11 |
|
|
|
|
|
|
|
12 |
|
13 |
text = f"""
|
14 |
🎯 The Leaderboard aims to track TheBloke's quantized models.
|
@@ -136,5 +142,5 @@ with gr.Blocks() as demo:
|
|
136 |
|
137 |
search_bar.submit(fn=search, inputs=search_bar, outputs=gr_df)
|
138 |
|
139 |
-
|
140 |
demo.launch()
|
|
|
5 |
import gradio as gr
|
6 |
import datetime
|
7 |
import pandas as pd
|
8 |
+
import os
|
9 |
+
|
10 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
11 |
|
12 |
api = HfApi()
|
13 |
fs = HfFileSystem()
|
14 |
|
15 |
+
def restart_space():
|
16 |
+
time.sleep(36000)
|
17 |
+
api.restart_space(repo_id="Weyaxi/thebloke-quantized-models", token=HF_TOKEN)
|
18 |
|
19 |
text = f"""
|
20 |
🎯 The Leaderboard aims to track TheBloke's quantized models.
|
|
|
142 |
|
143 |
search_bar.submit(fn=search, inputs=search_bar, outputs=gr_df)
|
144 |
|
145 |
+
threading.Thread(target=restart_space).start()
|
146 |
demo.launch()
|