Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,26 +172,26 @@ with gr.Blocks() as demo:
|
|
| 172 |
outputs=[status_output, results_table]
|
| 173 |
)
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
#
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
|
|
|
| 172 |
outputs=[status_output, results_table]
|
| 173 |
)
|
| 174 |
|
| 175 |
+
if __name__ == "__main__":
|
| 176 |
+
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 177 |
+
# Check for SPACE_HOST and SPACE_ID at startup for information
|
| 178 |
+
space_host_startup = os.getenv("SPACE_HOST")
|
| 179 |
+
space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup
|
| 180 |
+
|
| 181 |
+
if space_host_startup:
|
| 182 |
+
print(f"✅ SPACE_HOST found: {space_host_startup}")
|
| 183 |
+
print(f" Runtime URL should be: https://{space_host_startup}.hf.space")
|
| 184 |
+
else:
|
| 185 |
+
print("ℹ️ SPACE_HOST environment variable not found (running locally?).")
|
| 186 |
+
|
| 187 |
+
if space_id_startup: # Print repo URLs if SPACE_ID is found
|
| 188 |
+
print(f"✅ SPACE_ID found: {space_id_startup}")
|
| 189 |
+
print(f" Repo URL: https://huggingface.co/spaces/{space_id_startup}")
|
| 190 |
+
print(f" Repo Tree URL: https://huggingface.co/spaces/{space_id_startup}/tree/main")
|
| 191 |
+
else:
|
| 192 |
+
print("ℹ️ SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined.")
|
| 193 |
+
|
| 194 |
+
print("-"*(60 + len(" App Starting ")) + "\n")
|
| 195 |
+
|
| 196 |
+
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
| 197 |
+
demo.launch(debug=True, share=False)
|