Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
3d50d2f
1
Parent(s):
fb64c53
SAPCES
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from sentry_sdk import capture_exception
|
|
10 |
from sentry_sdk.integrations.logging import LoggingIntegration
|
11 |
from sentry_sdk.integrations.starlette import StarletteIntegration
|
12 |
from sentry_sdk.integrations.fastapi import FastApiIntegration
|
13 |
-
|
14 |
dsn = os.getenv("SENTRY_DSN")
|
15 |
if not dsn:
|
16 |
print("WARNING: SENTRY_DSN not set – Sentry disabled")
|
@@ -321,7 +321,7 @@ if os.path.exists(DEFAULT_MATERIALS_CSV):
|
|
321 |
else:
|
322 |
initial_df.to_csv(DEFAULT_MATERIALS_CSV, index=False)
|
323 |
|
324 |
-
|
325 |
def run_autoforge_process(cmd, log_path):
|
326 |
"""
|
327 |
Launch the external `autoforge` CLI.
|
@@ -969,4 +969,4 @@ if __name__ == "__main__":
|
|
969 |
except Exception as e:
|
970 |
print(f"Could not write default {DEFAULT_MATERIALS_CSV}: {e}")
|
971 |
print("To run the UI, execute: python app.py") # Corrected to python app.py
|
972 |
-
demo.queue().launch(share=False)
|
|
|
10 |
from sentry_sdk.integrations.logging import LoggingIntegration
|
11 |
from sentry_sdk.integrations.starlette import StarletteIntegration
|
12 |
from sentry_sdk.integrations.fastapi import FastApiIntegration
|
13 |
+
import spaces
|
14 |
dsn = os.getenv("SENTRY_DSN")
|
15 |
if not dsn:
|
16 |
print("WARNING: SENTRY_DSN not set – Sentry disabled")
|
|
|
321 |
else:
|
322 |
initial_df.to_csv(DEFAULT_MATERIALS_CSV, index=False)
|
323 |
|
324 |
+
@spaces.GPU(duration=90) # GPU reserved only for this call
|
325 |
def run_autoforge_process(cmd, log_path):
|
326 |
"""
|
327 |
Launch the external `autoforge` CLI.
|
|
|
969 |
except Exception as e:
|
970 |
print(f"Could not write default {DEFAULT_MATERIALS_CSV}: {e}")
|
971 |
print("To run the UI, execute: python app.py") # Corrected to python app.py
|
972 |
+
demo.queue(default_concurrency_limit=4).launch(share=False)
|