File size: 1,076 Bytes
10e9b7d
316ce01
e80aab9
 
3c4371f
b7d8085
3c4371f
b7d8085
7d65c66
3c4371f
 
7d65c66
3c4371f
7d65c66
 
b7d8085
7d65c66
 
 
 
 
 
3c4371f
 
31243f4
fb960b8
3c4371f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
from src.utils.gradio_ui import user_interface

if __name__ == "__main__":
    print("\n" + "-"*30 + " App Starting " + "-"*30)

    space_host_startup = os.getenv("SPACE_HOST")
    space_id_startup = os.getenv("SPACE_ID")

    if space_host_startup:
        print(f"✅ SPACE_HOST found: {space_host_startup}")
        print(f"   Runtime URL should be: https://{space_host_startup}.hf.space")
    else:
        print("ℹ️  SPACE_HOST environment variable not found (running locally?).")

    if space_id_startup:
        print(f"✅ SPACE_ID found: {space_id_startup}")
        print(f"   Repo URL: https://huggingface.co/spaces/{space_id_startup}")
        print(f"   Repo Tree URL: https://huggingface.co/spaces/{space_id_startup}/tree/main")
    else:
        print("ℹ️  SPACE_ID environment variable not found (running locally?). Repo URL cannot be determined.")

    print("-"*(60 + len(" App Starting ")) + "\n")

    print("Launching Gradio Interface for Basic Agent Evaluation...")
    demo = user_interface()
    demo.launch(debug=True, share=False)