RaadReturnly commited on
Commit
fdf19d1
Β·
verified Β·
1 Parent(s): 3ca63c0

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +26 -0
  2. requirements.txt +5 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ # βœ… Path to the preprocessed file stored on Hugging Face
5
+ PROCESSED_FILE_PATH = "output.xlsx" # Ensure this file is uploaded to your Hugging Face Space
6
+
7
+ # βœ… Function to Return Preprocessed File
8
+ def process_file(filepath):
9
+ if not filepath:
10
+ return "❌ Please upload a valid file."
11
+
12
+ # βœ… Return the static processed file (already stored in Hugging Face)
13
+ return PROCESSED_FILE_PATH
14
+
15
+ # βœ… Create Gradio Interface
16
+ iface = gr.Interface(
17
+ fn=process_file,
18
+ inputs=gr.File(type="filepath", label="πŸ“€ Upload your Excel file"),
19
+ outputs=gr.File(label="πŸ“₯ Download Processed File"),
20
+ title="DIGITAG – Intelligent Price, Seamless Label",
21
+ 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! πŸš€"
22
+ )
23
+
24
+ # βœ… Launch Gradio App
25
+ if __name__ == "__main__":
26
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ openai
2
+ requests
3
+ pandas
4
+ openpyxl
5
+ gradio