Spaces:
Runtime error
Runtime error
Update app.py (#2)
Browse files- Update app.py (cafd48559383a2f5ac0c982a3a3b70c99c7bb078)
Co-authored-by: Ze <Brianpuz@users.noreply.huggingface.co>
app.py
CHANGED
@@ -227,7 +227,7 @@ def process_model(model_id, q_method, use_imatrix, imatrix_q_method, private_rep
|
|
227 |
api.upload_file(path_or_fileobj=imatrix_path, path_in_repo="imatrix.dat", repo_id=repo_id)
|
228 |
api.upload_file(path_or_fileobj=readme_path, path_in_repo="README.md", repo_id=repo_id)
|
229 |
|
230 |
-
return (f'<h1>✅ DONE</h1><br/>Repo: <a href="{new_repo_url}" target="_blank" style="text-decoration:underline">{repo_id}</a>', "llama.png")
|
231 |
|
232 |
|
233 |
css="""/* Custom CSS to allow scrolling */
|
@@ -338,7 +338,7 @@ iface = gr.Interface(
|
|
338 |
description="We take your Hugging Face repo — a terrific repo — we quantize it, we package it beautifully, and we give you your very own repo. It's smart. It's efficient. It's huge. You're gonna love it.",
|
339 |
api_name=False
|
340 |
)
|
341 |
-
with gr.Blocks(css=".gradio-container {overflow-y: auto;}") as demo:
|
342 |
gr.Markdown("Logged in, you must be. Classy, secure, and victorious, it keeps us.")
|
343 |
gr.LoginButton(min_width=250)
|
344 |
|
@@ -354,7 +354,7 @@ with gr.Blocks(css=".gradio-container {overflow-y: auto;}") as demo:
|
|
354 |
|
355 |
|
356 |
def restart_space():
|
357 |
-
HfApi().restart_space(repo_id="
|
358 |
|
359 |
scheduler = BackgroundScheduler()
|
360 |
scheduler.add_job(restart_space, "interval", seconds=21600)
|
|
|
227 |
api.upload_file(path_or_fileobj=imatrix_path, path_in_repo="imatrix.dat", repo_id=repo_id)
|
228 |
api.upload_file(path_or_fileobj=readme_path, path_in_repo="README.md", repo_id=repo_id)
|
229 |
|
230 |
+
return (f'<h1>✅ DONE</h1><br/>Repo: <a href="{new_repo_url}" target="_blank" style="text-decoration:underline">{repo_id}</a>', f"llama{np.random.randint(9)}.png")
|
231 |
|
232 |
|
233 |
css="""/* Custom CSS to allow scrolling */
|
|
|
338 |
description="We take your Hugging Face repo — a terrific repo — we quantize it, we package it beautifully, and we give you your very own repo. It's smart. It's efficient. It's huge. You're gonna love it.",
|
339 |
api_name=False
|
340 |
)
|
341 |
+
with gr.Blocks(css=".gradio-container {overflow-y: auto;}",theme=gr.themes.Glass()) as demo:
|
342 |
gr.Markdown("Logged in, you must be. Classy, secure, and victorious, it keeps us.")
|
343 |
gr.LoginButton(min_width=250)
|
344 |
|
|
|
354 |
|
355 |
|
356 |
def restart_space():
|
357 |
+
HfApi().restart_space(repo_id="Antigma/quantize-my-repo", token=HF_TOKEN, factory_reboot=True)
|
358 |
|
359 |
scheduler = BackgroundScheduler()
|
360 |
scheduler.add_job(restart_space, "interval", seconds=21600)
|