Update app.py
Browse files
app.py
CHANGED
|
@@ -496,7 +496,6 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 496 |
agent.cleanup()
|
| 497 |
|
| 498 |
|
| 499 |
-
# --- Build Gradio Interface using Blocks (as per template) ---
|
| 500 |
# --- Build Gradio Interface using Blocks (as per template) ---
|
| 501 |
with gr.Blocks() as demo:
|
| 502 |
gr.Markdown("# Hugging Face Agent Certification Runner")
|
|
@@ -527,23 +526,19 @@ with gr.Blocks() as demo:
|
|
| 527 |
show_progress=True, # Show Gradio's internal progress bar
|
| 528 |
)
|
| 529 |
|
| 530 |
-
if __name__ == "__main__":
|
| 531 |
-
# ... (rest of your launch code) ...
|
| 532 |
-
demo.launch(debug=True, share=False)
|
| 533 |
-
|
| 534 |
if __name__ == "__main__":
|
| 535 |
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 536 |
space_host_startup = os.getenv("SPACE_HOST")
|
| 537 |
space_id_startup = os.getenv("SPACE_ID")
|
| 538 |
if space_host_startup:
|
| 539 |
print(f"✅ SPACE_HOST found: {space_host_startup}")
|
| 540 |
-
print(f"
|
| 541 |
else:
|
| 542 |
print("ℹ️ SPACE_HOST environment variable not found (running locally?).")
|
| 543 |
if space_id_startup:
|
| 544 |
print(f"✅ SPACE_ID found: {space_id_startup}")
|
| 545 |
-
print(f"
|
| 546 |
-
print(f"
|
| 547 |
else:
|
| 548 |
print("ℹ️ SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined.")
|
| 549 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
|
|
|
| 496 |
agent.cleanup()
|
| 497 |
|
| 498 |
|
|
|
|
| 499 |
# --- Build Gradio Interface using Blocks (as per template) ---
|
| 500 |
with gr.Blocks() as demo:
|
| 501 |
gr.Markdown("# Hugging Face Agent Certification Runner")
|
|
|
|
| 526 |
show_progress=True, # Show Gradio's internal progress bar
|
| 527 |
)
|
| 528 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 529 |
if __name__ == "__main__":
|
| 530 |
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 531 |
space_host_startup = os.getenv("SPACE_HOST")
|
| 532 |
space_id_startup = os.getenv("SPACE_ID")
|
| 533 |
if space_host_startup:
|
| 534 |
print(f"✅ SPACE_HOST found: {space_host_startup}")
|
| 535 |
+
print(f" Runtime URL should be: https://{space_host_startup}.hf.space")
|
| 536 |
else:
|
| 537 |
print("ℹ️ SPACE_HOST environment variable not found (running locally?).")
|
| 538 |
if space_id_startup:
|
| 539 |
print(f"✅ SPACE_ID found: {space_id_startup}")
|
| 540 |
+
print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")
|
| 541 |
+
print(f" Repo Tree URL: https://huggingface.co/spaces/{space_id_startup}/tree/main")
|
| 542 |
else:
|
| 543 |
print("ℹ️ SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined.")
|
| 544 |
print("-"*(60 + len(" App Starting ")) + "\n")
|