epochs-demos commited on
Commit
597b7d3
1 Parent(s): 431701c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -31
app.py CHANGED
@@ -132,46 +132,34 @@ def make_frontend(
132
  gallery = gr.Gallery(label="Relevant Items", examples_per_row=4, show_labels=True)
133
 
134
  # Build a customized browser interface to a Python function
135
- frontend = gr.Interface(
136
- fn=fn,
137
- outputs=gr.outputs.Group([gr.outputs.HTML(""), gallery]),
138
- inputs=gr.inputs.Group([textbox]),
139
- title="Fashion Aggregator", # Update the title to a more descriptive name
140
- thumbnail="./1001epochs.png", # Replace with the path to your company logo image
141
- description="Discover your perfect apparel effortlessly. Simply describe what you're looking for!",
142
- cache_examples=False,
143
- allow_flagging=allow_flagging,
144
- flagging_options=["incorrect", "offensive", "other"],
145
- )
146
-
147
-
148
- # # Build a customized browser interface to a Python function
149
  # frontend = gr.Interface(
150
  # fn=fn,
151
- # outputs=gr.Gallery(label="Relevant Items", show_labels=True, label_position="below"),
152
- # inputs=gr.inputs.Textbox(label="Item Description", placeholder="Enter item description here"),
153
- # title="Fashion Aggregator",
154
- # thumbnail=FAVICON,
155
  # description="Discover your perfect apparel effortlessly. Simply describe what you're looking for!",
156
  # cache_examples=False,
157
  # allow_flagging=allow_flagging,
158
  # flagging_options=["incorrect", "offensive", "other"],
159
  # )
160
 
161
- # Apply custom CSS styles to enhance the design and layout
162
- # frontend.styles(
163
- # # Modify the styles according to your preferences
164
- # title="color: #333333; font-size: 28px; font-weight: bold; margin-bottom: 10px; text-align: center;",
165
- # description="color: #666666; font-size: 16px; margin-bottom: 20px; text-align: center;",
166
- # input="padding: 10px; border-radius: 5px; border: 1px solid #dddddd; font-size: 16px; width: 80%; margin: 0 auto;",
167
- # output_gallery="margin-top: 20px;",
168
- # output_image="border-radius: 10px; box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);",
169
- # flag_button="background-color: #ff5555;",
170
- # flag_options="color: #333333;",
171
- # )
172
 
173
- # # Customize the HTML template to enhance the design and layout
174
- # frontend.template = "gradio/custom.html"
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
  return frontend
177
 
 
132
  gallery = gr.Gallery(label="Relevant Items", examples_per_row=4, show_labels=True)
133
 
134
  # Build a customized browser interface to a Python function
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  # frontend = gr.Interface(
136
  # fn=fn,
137
+ # outputs=gr.outputs.Group([gr.outputs.HTML(""), gallery]),
138
+ # inputs=gr.inputs.Group([textbox]),
139
+ # title="Fashion Aggregator", # Update the title to a more descriptive name
140
+ # thumbnail="./1001epochs.png", # Replace with the path to your company logo image
141
  # description="Discover your perfect apparel effortlessly. Simply describe what you're looking for!",
142
  # cache_examples=False,
143
  # allow_flagging=allow_flagging,
144
  # flagging_options=["incorrect", "offensive", "other"],
145
  # )
146
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
+ # Build a customized browser interface to a Python function
149
+ frontend = gr.Interface(
150
+ fn=fn,
151
+ outputs=gr.Gallery(label="Relevant Items", show_labels=True, label_position="below"),
152
+ inputs=gr.inputs.Textbox(label="Item Description", placeholder="Enter item description here"),
153
+ title="Fashion Aggregator",
154
+ thumbnail=FAVICON,
155
+ description="Discover your perfect apparel effortlessly. Simply describe what you're looking for!",
156
+ cache_examples=False,
157
+ allow_flagging=allow_flagging,
158
+ flagging_options=["incorrect", "offensive", "other"],
159
+ )
160
+
161
+ # Customize the HTML template to enhance the design and layout
162
+ frontend.template = "gradio/custom.html"
163
 
164
  return frontend
165