epochs-demos commited on
Commit
431701c
·
1 Parent(s): 86b6f09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -5
app.py CHANGED
@@ -128,19 +128,36 @@ def make_frontend(
128
 
129
  allow_flagging = "never"
130
 
131
- # Build a customized browser interface to a Python function
 
 
 
132
  frontend = gr.Interface(
133
  fn=fn,
134
- outputs=gr.Gallery(label="Relevant Items", show_labels=True, label_position="below"),
135
- inputs=gr.inputs.Textbox(label="Item Description", placeholder="Enter item description here"),
136
- title="Fashion Aggregator",
137
- thumbnail=FAVICON,
138
  description="Discover your perfect apparel effortlessly. Simply describe what you're looking for!",
139
  cache_examples=False,
140
  allow_flagging=allow_flagging,
141
  flagging_options=["incorrect", "offensive", "other"],
142
  )
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  # Apply custom CSS styles to enhance the design and layout
145
  # frontend.styles(
146
  # # Modify the styles according to your preferences
 
128
 
129
  allow_flagging = "never"
130
 
131
+ textbox = gr.components.Textbox(label="Item Description")
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