Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
c8df84a
1
Parent(s):
d3ab058
fix spaces and background picker
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from sentry_sdk import capture_exception, push_scope, capture_message
|
|
8 |
from sentry_sdk.integrations.logging import LoggingIntegration
|
9 |
from sentry_sdk.integrations.starlette import StarletteIntegration
|
10 |
from sentry_sdk.integrations.fastapi import FastApiIntegration
|
11 |
-
|
12 |
dsn = os.getenv("SENTRY_DSN")
|
13 |
if not dsn:
|
14 |
print("WARNING: SENTRY_DSN not set – Sentry disabled")
|
@@ -310,7 +310,7 @@ if os.path.exists(DEFAULT_MATERIALS_CSV):
|
|
310 |
else:
|
311 |
initial_df.to_csv(DEFAULT_MATERIALS_CSV, index=False)
|
312 |
|
313 |
-
|
314 |
def run_autoforge_process(cmd, log_path):
|
315 |
"""
|
316 |
Launch the external `autoforge` CLI.
|
@@ -740,6 +740,10 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
740 |
continue
|
741 |
else:
|
742 |
continue
|
|
|
|
|
|
|
|
|
743 |
if isinstance(arg_widget_val, bool):
|
744 |
if arg_widget_val:
|
745 |
command.append(arg_name)
|
|
|
8 |
from sentry_sdk.integrations.logging import LoggingIntegration
|
9 |
from sentry_sdk.integrations.starlette import StarletteIntegration
|
10 |
from sentry_sdk.integrations.fastapi import FastApiIntegration
|
11 |
+
import spaces
|
12 |
dsn = os.getenv("SENTRY_DSN")
|
13 |
if not dsn:
|
14 |
print("WARNING: SENTRY_DSN not set – Sentry disabled")
|
|
|
310 |
else:
|
311 |
initial_df.to_csv(DEFAULT_MATERIALS_CSV, index=False)
|
312 |
|
313 |
+
@spaces.GPU(duration=90) # GPU reserved only for this call
|
314 |
def run_autoforge_process(cmd, log_path):
|
315 |
"""
|
316 |
Launch the external `autoforge` CLI.
|
|
|
740 |
continue
|
741 |
else:
|
742 |
continue
|
743 |
+
|
744 |
+
if arg_name == "--background_color":
|
745 |
+
arg_widget_val = rgba_to_hex(arg_widget_val)
|
746 |
+
|
747 |
if isinstance(arg_widget_val, bool):
|
748 |
if arg_widget_val:
|
749 |
command.append(arg_name)
|