Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ def query(payload, API_URL, headers):
|
|
27 |
return response.content
|
28 |
|
29 |
# Function to generate images based on prompts using the Hugging Face API
|
30 |
-
def generate_image(prompt, model_choice
|
31 |
-
|
32 |
-
|
33 |
model_urls = {
|
34 |
"Stable Diffusion v1.5": "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5",
|
35 |
"dalle-3-xl-v2": "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl-v2",
|
|
|
27 |
return response.content
|
28 |
|
29 |
# Function to generate images based on prompts using the Hugging Face API
|
30 |
+
def generate_image(prompt, model_choice):
|
31 |
+
|
32 |
+
prompt = translate_text(prompt, target_language='en') # Assuming you want to translate to English
|
33 |
model_urls = {
|
34 |
"Stable Diffusion v1.5": "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5",
|
35 |
"dalle-3-xl-v2": "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl-v2",
|