hvoss-techfak commited on
Commit
fb64c53
·
1 Parent(s): b8b4726

documentation

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- import spaces
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
- @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.
@@ -576,7 +576,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
576
  'If you want to limit the number of colors or color swaps you can find the option under the "Autoforge Parameters" as "pruning_max_colors" and "pruning_max_swaps"'
577
  )
578
  gr.Markdown(
579
- 'Please note that huggingface enforces a maximum execution time of one minute. Depending on your configuration (especially iteration count) it is possible to exceed this time limit. In that case you will see a "GPU Task aborted" error.'
580
  ' If you need more time, take a look at the [Autoforge Github Page](https://github.com/hvoss-techfak/AutoForge) to see how you can run the program locally, or pull the docker container for this project (upper right corner -> three dots -> "run locally")'
581
  )
582
  gr.Markdown(
@@ -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(default_concurrency_limit=4).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.
 
576
  'If you want to limit the number of colors or color swaps you can find the option under the "Autoforge Parameters" as "pruning_max_colors" and "pruning_max_swaps"'
577
  )
578
  gr.Markdown(
579
+ 'Please note that huggingface enforces a maximum execution time of one minute. Depending on your configuration (especially iteration count) it is possible to exceed this time limit. In that case you will see a "GPU Task aborted" error or simply "Error".'
580
  ' If you need more time, take a look at the [Autoforge Github Page](https://github.com/hvoss-techfak/AutoForge) to see how you can run the program locally, or pull the docker container for this project (upper right corner -> three dots -> "run locally")'
581
  )
582
  gr.Markdown(
 
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)