matteomarjanovic commited on
Commit
da44470
·
1 Parent(s): fce1ba1

delete groq prompts and add sources image

Browse files
Files changed (1) hide show
  1. app.py +1 -41
app.py CHANGED
@@ -109,46 +109,6 @@ def generate_description_fn(
109
  contents=[description_prompt, image]
110
  )
111
  prompt = response.text + " In the style of FLTSKC"
112
-
113
-
114
- # client = Groq(
115
- # api_key=os.environ.get("GROQ_API_KEY"),
116
- # )
117
-
118
- # chat_completion = client.chat.completions.create(
119
- # messages=[
120
- # {
121
- # "role": "user",
122
- # "content": [
123
- # {
124
- # "type": "text",
125
- # "text": """
126
- # I want you to imagine how the technical flat sketch of the garment you see in the picture would look like, and describe it in rich details, in one paragraph.
127
- # Don't add any additional comment.
128
- # Specify that the flat sketch is black and white (even if the original garment has a color) and that it doesn't include the person that wear the garment.
129
-
130
-
131
- # The style of the result should look somewhat like the following example:
132
- # The technical flat sketch of the dress depicts a midi-length, off-the-shoulder design with a smocked bodice and short puff sleeves that have elasticized cuffs.
133
- # The elastic neckline sits straight across the chest and back, ensuring a secure fit.
134
- # The bodice transitions into a flowy, tiered skirt with three evenly spaced gathered panels, creating soft volume.
135
- # Elasticized areas are marked with textured lines, while the gathers and drape is indicated through subtle curved strokes, ensuring clarity in construction details.
136
- # The flat sketch does NOT include any person and it's only the in black and white, being a technical drawing.
137
- # """
138
- # },
139
- # {
140
- # "type": "image_url",
141
- # "image_url": {
142
- # "url": f"data:image/jpeg;base64,{base64_image}",
143
- # },
144
- # },
145
- # ],
146
- # }
147
- # ],
148
- # model="llama-3.2-11b-vision-preview",
149
- # )
150
-
151
- # prompt = chat_completion.choices[0].message.content + " In the style of FLTSKC"
152
 
153
  control_image = processor(
154
  image,
@@ -196,7 +156,7 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
196
  with gr.Row():
197
  with gr.Column(elem_id="col-input-image"):
198
  # gr.Markdown(" ## Drop your image here")
199
- input_image = gr.Image(type="pil", value=default_img)
200
  with gr.Column(elem_id="col-container"):
201
  generate_button = gr.Button("Generate flat sketch", scale=0, variant="primary", elem_classes="btn btn-primary")
202
 
 
109
  contents=[description_prompt, image]
110
  )
111
  prompt = response.text + " In the style of FLTSKC"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  control_image = processor(
114
  image,
 
156
  with gr.Row():
157
  with gr.Column(elem_id="col-input-image"):
158
  # gr.Markdown(" ## Drop your image here")
159
+ input_image = gr.Image(type="pil", sources=["upload", "clipboard"], value=default_img)
160
  with gr.Column(elem_id="col-container"):
161
  generate_button = gr.Button("Generate flat sketch", scale=0, variant="primary", elem_classes="btn btn-primary")
162