Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,10 +16,11 @@ from fastapi import FastAPI
|
|
16 |
|
17 |
app = FastAPI()
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
23 |
|
24 |
api_key = os.getenv("MISTRAL_API_KEY")
|
25 |
Mistralclient = Mistral(api_key=api_key)
|
@@ -38,8 +39,7 @@ def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
38 |
|
39 |
key = random.randint(0, 999)
|
40 |
|
41 |
-
|
42 |
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
43 |
|
44 |
# Translate the prompt from Russian to English if necessary
|
45 |
prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
|
|
|
16 |
|
17 |
app = FastAPI()
|
18 |
|
19 |
+
gr.load(
|
20 |
+
"models/stabilityai/stable-diffusion-3.5-large-turbo",
|
21 |
+
provider="hf-inference",
|
22 |
+
) "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3.5-large"
|
23 |
+
|
24 |
|
25 |
api_key = os.getenv("MISTRAL_API_KEY")
|
26 |
Mistralclient = Mistral(api_key=api_key)
|
|
|
39 |
|
40 |
key = random.randint(0, 999)
|
41 |
|
42 |
+
|
|
|
43 |
|
44 |
# Translate the prompt from Russian to English if necessary
|
45 |
prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
|