Spaces:
Runtime error
Runtime error
Commit
·
1c71d5b
1
Parent(s):
998b8a0
app.py
CHANGED
@@ -4,6 +4,9 @@ import gradio as gr
|
|
4 |
from stability_sdk.api import Context
|
5 |
from stability_sdk.animation_ui import create_ui
|
6 |
|
|
|
|
|
|
|
7 |
|
8 |
# @markdown To get your API key visit https://dreamstudio.ai/account
|
9 |
STABILITY_HOST = "grpc.stability.ai:443" #@param {type:"string"}
|
@@ -21,16 +24,4 @@ show_ui_in_notebook = True #@param {type:"boolean"}
|
|
21 |
|
22 |
outputs_path = r'C:\Work\tst\SAnim'
|
23 |
|
24 |
-
# Create UI
|
25 |
-
interface = create_ui(context, outputs_path)
|
26 |
-
|
27 |
-
# Set concurrency_limit on the Interface
|
28 |
-
interface = gr.Interface(fn=interface.fn, inputs=interface.inputs, outputs=interface.outputs, concurrency_limit=2)
|
29 |
-
|
30 |
-
# Launch the UI
|
31 |
-
interface.launch(show_api=False, debug=True, inline=show_ui_in_notebook, height=768, share=True, show_error=True)
|
32 |
-
# Create UI
|
33 |
-
ui = create_ui(context, outputs_path)
|
34 |
|
35 |
-
# Launch the UI with the concurrency_limit parameter
|
36 |
-
ui.launch(concurrency_limit=2, show_api=False, debug=True, inline=show_ui_in_notebook, height=768, share=True, show_error=True)
|
|
|
4 |
from stability_sdk.api import Context
|
5 |
from stability_sdk.animation_ui import create_ui
|
6 |
|
7 |
+
from dotenv import load_dotenv
|
8 |
+
|
9 |
+
load_dotenv(".env")
|
10 |
|
11 |
# @markdown To get your API key visit https://dreamstudio.ai/account
|
12 |
STABILITY_HOST = "grpc.stability.ai:443" #@param {type:"string"}
|
|
|
24 |
|
25 |
outputs_path = r'C:\Work\tst\SAnim'
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
|
|
|