epochs-demos commited on
Commit
bc048f8
·
1 Parent(s): a2b8dec

Update app.py

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