File size: 655 Bytes
ff3c6aa
 
998b8a0
ff3c6aa
 
 
1c71d5b
 
 
998b8a0
ff3c6aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe2bf46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#@title Connect to the Stability API
import os
import gradio as gr
from stability_sdk.api import Context
from stability_sdk.animation_ui import create_ui

from dotenv import load_dotenv

load_dotenv(".env") 

# @markdown To get your API key visit https://dreamstudio.ai/account
STABILITY_HOST = "grpc.stability.ai:443" #@param {type:"string"}
STABILITY_KEY = os.getenv("STABILITY_KEY")

# Connect to Stability API
context = Context(STABILITY_HOST, STABILITY_KEY)

# Test the connection
context.get_user_info()
print("Connection successful!")

#@title Animation UI
show_ui_in_notebook = True #@param {type:"boolean"}

outputs_path = r'C:\Work\tst\SAnim'