Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,18 @@
|
|
| 1 |
import os
|
| 2 |
import io
|
| 3 |
import time
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
-
|
| 6 |
-
from modules
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
APP_NAME = "Auto-PPT Generator"
|
| 10 |
|
|
|
|
| 1 |
import os
|
| 2 |
import io
|
| 3 |
import time
|
| 4 |
+
import sys
|
| 5 |
import gradio as gr
|
| 6 |
+
|
| 7 |
+
# --- add: make sure we can import from ./modules even if it's not a package
|
| 8 |
+
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 9 |
+
MODULES_DIR = os.path.join(BASE_DIR, "modules")
|
| 10 |
+
if MODULES_DIR not in sys.path:
|
| 11 |
+
sys.path.insert(0, MODULES_DIR)
|
| 12 |
+
|
| 13 |
+
from text_processing import process_text
|
| 14 |
+
from pptx_builder import build_presentation
|
| 15 |
+
from utils import safe_hex_to_rgb, ensure_tmpdir
|
| 16 |
|
| 17 |
APP_NAME = "Auto-PPT Generator"
|
| 18 |
|