Spaces:
Sleeping
Sleeping
Remove authentication - make UI fully public
Browse files
app.py
CHANGED
|
@@ -2,32 +2,11 @@
|
|
| 2 |
Hugging Face Spaces entry point
|
| 3 |
This file is required for HF Spaces deployment
|
| 4 |
"""
|
| 5 |
-
import os
|
| 6 |
-
import json
|
| 7 |
-
|
| 8 |
print("Starting Crypto Index Tracker...")
|
| 9 |
|
| 10 |
# Import the interface - it's created at module level
|
| 11 |
from index_interface_hf import iface
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
auth_json = os.getenv("AUTH_USERS", "")
|
| 15 |
-
if auth_json:
|
| 16 |
-
try:
|
| 17 |
-
# Parse JSON string into list of tuples
|
| 18 |
-
auth_dict = json.loads(auth_json)
|
| 19 |
-
auth_list = [(user, pwd) for user, pwd in auth_dict.items()]
|
| 20 |
-
print(f"Loaded {len(auth_list)} authorized users")
|
| 21 |
-
except Exception as e:
|
| 22 |
-
print(f"Error parsing AUTH_USERS: {e}")
|
| 23 |
-
auth_list = None
|
| 24 |
-
else:
|
| 25 |
-
print("No AUTH_USERS configured - running without authentication")
|
| 26 |
-
auth_list = None
|
| 27 |
-
|
| 28 |
-
# Launch with authentication if configured
|
| 29 |
print("Launching Gradio interface...")
|
| 30 |
-
|
| 31 |
-
iface.launch(auth=auth_list)
|
| 32 |
-
else:
|
| 33 |
-
iface.launch()
|
|
|
|
| 2 |
Hugging Face Spaces entry point
|
| 3 |
This file is required for HF Spaces deployment
|
| 4 |
"""
|
|
|
|
|
|
|
|
|
|
| 5 |
print("Starting Crypto Index Tracker...")
|
| 6 |
|
| 7 |
# Import the interface - it's created at module level
|
| 8 |
from index_interface_hf import iface
|
| 9 |
|
| 10 |
+
# Launch without authentication - let everyone use the UI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
print("Launching Gradio interface...")
|
| 12 |
+
iface.launch()
|
|
|
|
|
|
|
|
|