Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -209,8 +209,20 @@ def generate_dashboard():
|
|
209 |
|
210 |
# Gradio Interfaces
|
211 |
with gr.Blocks() as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
gr.Markdown("# 🔐 Circular Economy Marketplace")
|
213 |
with gr.Tab("Login/Register"):
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
with gr.Tab("Register"):
|
215 |
reg_username = gr.Textbox(label="Username")
|
216 |
reg_password = gr.Textbox(label="Password", type="password")
|
@@ -254,11 +266,23 @@ with gr.Blocks() as app:
|
|
254 |
pricing_btn = gr.Button("Predict")
|
255 |
pricing_btn.click(predict_price, inputs=pricing_inputs, outputs=pricing_output)
|
256 |
with gr.Tab("Product Recommendation"):
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
recommendation_input = gr.Dropdown(choices=df_recommendation['category'].unique().tolist(), label="Select Product Category")
|
258 |
recommendation_output = gr.Dataframe()
|
259 |
recommendation_btn = gr.Button("Recommend")
|
260 |
recommendation_btn.click(recommend_products, inputs=recommendation_input, outputs=recommendation_output)
|
261 |
with gr.Tab("Circular Economy Analytics"):
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
dashboard_outputs = [
|
263 |
gr.Plot(label="Product Lifecycle Analytics"),
|
264 |
gr.Plot(label="Dynamic Pricing Insights"),
|
|
|
209 |
|
210 |
# Gradio Interfaces
|
211 |
with gr.Blocks() as app:
|
212 |
+
# Add a logo or banner image
|
213 |
+
gr.Markdown("""
|
214 |
+
<div style="text-align: center;">
|
215 |
+
<img src="https://via.placeholder.com/800x200.png?text=Circular+Economy+Marketplace" alt="Banner" style="width: 100%; max-width: 800px;">
|
216 |
+
</div>
|
217 |
+
""")
|
218 |
gr.Markdown("# 🔐 Circular Economy Marketplace")
|
219 |
with gr.Tab("Login/Register"):
|
220 |
+
# Add an image to the Login/Register tab
|
221 |
+
gr.Markdown("""
|
222 |
+
<div style="text-align: center;">
|
223 |
+
<img src="https://miro.medium.com/v2/resize:fit:1157/0*DmOXUHYIA7vl5QgR.jpeg?text=Login+or+Register" alt="Login/Register" style="width: 100%; max-width: 400px;">
|
224 |
+
</div>
|
225 |
+
""")
|
226 |
with gr.Tab("Register"):
|
227 |
reg_username = gr.Textbox(label="Username")
|
228 |
reg_password = gr.Textbox(label="Password", type="password")
|
|
|
266 |
pricing_btn = gr.Button("Predict")
|
267 |
pricing_btn.click(predict_price, inputs=pricing_inputs, outputs=pricing_output)
|
268 |
with gr.Tab("Product Recommendation"):
|
269 |
+
# Add an image to the Product Recommendation tab
|
270 |
+
gr.Markdown("""
|
271 |
+
<div style="text-align: center;">
|
272 |
+
<img src="https://wizzy.ai/blog/wp-content/uploads/2021/04/Product-Recommendation-Implementation.jpg?text=Product+Recommendations" alt="Product Recommendations" style="width: 100%; max-width: 400px;">
|
273 |
+
</div>
|
274 |
+
""")
|
275 |
recommendation_input = gr.Dropdown(choices=df_recommendation['category'].unique().tolist(), label="Select Product Category")
|
276 |
recommendation_output = gr.Dataframe()
|
277 |
recommendation_btn = gr.Button("Recommend")
|
278 |
recommendation_btn.click(recommend_products, inputs=recommendation_input, outputs=recommendation_output)
|
279 |
with gr.Tab("Circular Economy Analytics"):
|
280 |
+
# Add an image to the Analytics tab
|
281 |
+
gr.Markdown("""
|
282 |
+
<div style="text-align: center;">
|
283 |
+
<img src="https://www.pngrepo.com/download/219294/analysis-chart.png?text=Analytics+Dashboard" alt="Analytics" style="width: 100%; max-width: 400px;">
|
284 |
+
</div>
|
285 |
+
""")
|
286 |
dashboard_outputs = [
|
287 |
gr.Plot(label="Product Lifecycle Analytics"),
|
288 |
gr.Plot(label="Dynamic Pricing Insights"),
|