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()