Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,6 +24,9 @@ API_TOKEN = os.getenv("HF_READ_TOKEN")
|
|
24 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
25 |
timeout = 100
|
26 |
|
|
|
|
|
|
|
27 |
# Function to query the API and return the generated image
|
28 |
def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024):
|
29 |
if prompt == "" or prompt is None:
|
|
|
24 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
25 |
timeout = 100
|
26 |
|
27 |
+
api_key = os.getenv("MISTRAL_API_KEY")
|
28 |
+
Mistralclient = Mistral(api_key=api_key)
|
29 |
+
|
30 |
# Function to query the API and return the generated image
|
31 |
def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, width=1024, height=1024):
|
32 |
if prompt == "" or prompt is None:
|