Update app.py
Browse files
app.py
CHANGED
|
@@ -16,11 +16,6 @@ from diffusers import DiffusionPipeline
|
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
-
openai_api_key = os.getenv("OPENAI_API_KEY")
|
| 20 |
-
from langchain_openai import OpenAI
|
| 21 |
-
llm =OpenAI(temperature =0.8)
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
|
| 26 |
|
|
@@ -86,9 +81,9 @@ def generate_caption_and_image(image):
|
|
| 86 |
out = model.generate(**inputs)
|
| 87 |
caption1 = processor.decode(out[0], skip_special_tokens=True)
|
| 88 |
|
| 89 |
-
prompt = f"Generate a clothing item using the following details: 1. {caption1} 2. {caption2} 3. Fabric: {selected_fabric} 4. Pattern: {selected_pattern} 5. Design Style: {selected_textile_design}.
|
| 90 |
|
| 91 |
-
|
| 92 |
prompt +="The image should have a clean, minimalistic grey or white background, with realistic lighting and fine details, ensuring a sophisticated and polished appearance"
|
| 93 |
|
| 94 |
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
|
|
|
|
| 81 |
out = model.generate(**inputs)
|
| 82 |
caption1 = processor.decode(out[0], skip_special_tokens=True)
|
| 83 |
|
| 84 |
+
prompt = f"Generate a clothing item using the following details: 1. {caption1} 2. {caption2} 3. Fabric: {selected_fabric} 4. Pattern: {selected_pattern} 5. Design Style: {selected_textile_design}. "
|
| 85 |
|
| 86 |
+
|
| 87 |
prompt +="The image should have a clean, minimalistic grey or white background, with realistic lighting and fine details, ensuring a sophisticated and polished appearance"
|
| 88 |
|
| 89 |
|