dc086989 commited on
Commit
5980c33
·
verified ·
1 Parent(s): 9547b79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -1,5 +1,18 @@
1
  import gradio as gr
2
- from core_logic import DocumentProcessor
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  # Initialize the processor
5
  processor = DocumentProcessor()
@@ -77,7 +90,7 @@ with gr.Blocks(css=custom_css) as MiniAIdemo:
77
  pass
78
  with gr.Column(scale=3):
79
  whatsapp_status = gr.Textbox(label="Status", visible=False)
80
- whatsapp_btn = gr.Button("📱 Contact Us on WhatsApp", elem_classes="button-gradient")
81
  whatsapp_btn.click(open_whatsapp, outputs=whatsapp_status)
82
 
83
  with gr.Tabs():
 
1
  import gradio as gr
2
+ import sys
3
+ import os
4
+
5
+ # Add the dist directory to Python path
6
+ sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'dist'))
7
+
8
+ # Import obfuscated module
9
+ try:
10
+ from core_logic import *
11
+ except ImportError as e:
12
+ print(f"Error: Obfuscated module not found: {e}")
13
+ print("Current directory:", os.getcwd())
14
+ print("Files in dist:", os.listdir('dist') if os.path.exists('dist') else 'dist not found')
15
+ sys.exit(1)
16
 
17
  # Initialize the processor
18
  processor = DocumentProcessor()
 
90
  pass
91
  with gr.Column(scale=3):
92
  whatsapp_status = gr.Textbox(label="Status", visible=False)
93
+ whatsapp_btn = gr.Button(" Contact Us on WhatsApp", elem_classes="button-gradient")
94
  whatsapp_btn.click(open_whatsapp, outputs=whatsapp_status)
95
 
96
  with gr.Tabs():