README / app.py
RaadReturnly's picture
Upload 2 files
fdf19d1 verified
Raw
History Blame Contribute Delete
1.08 kB
import gradio as gr
import os
# βœ… Path to the preprocessed file stored on Hugging Face
PROCESSED_FILE_PATH = "output.xlsx" # Ensure this file is uploaded to your Hugging Face Space
# βœ… Function to Return Preprocessed File
def process_file(filepath):
if not filepath:
return "❌ Please upload a valid file."
# βœ… Return the static processed file (already stored in Hugging Face)
return PROCESSED_FILE_PATH
# βœ… Create Gradio Interface
iface = gr.Interface(
fn=process_file,
inputs=gr.File(type="filepath", label="πŸ“€ Upload your Excel file"),
outputs=gr.File(label="πŸ“₯ Download Processed File"),
title="DIGITAG – Intelligent Price, Seamless Label",
description="DIGITAG optimizes pricing using AI, factoring in profit margins, real product cost, expiry date, market trends, and customer behavior. Stay competitive with real-time price adjustments that boost revenue, reduce waste, and maximize profitability. Smarter pricing, better profits! πŸš€"
)
# βœ… Launch Gradio App
if __name__ == "__main__":
iface.launch()