sushilideaclan01 commited on
Commit
62b339b
·
1 Parent(s): d4a4da7
Files changed (1) hide show
  1. main.py +8 -0
main.py CHANGED
@@ -4,6 +4,14 @@ Design ads that stop the scroll. Generate high-converting ad creatives for Home
4
  Saves all ads to Neon PostgreSQL database with image URLs.
5
  """
6
 
 
 
 
 
 
 
 
 
7
  import os
8
  from contextlib import asynccontextmanager
9
  import httpx
 
4
  Saves all ads to Neon PostgreSQL database with image URLs.
5
  """
6
 
7
+ import sys
8
+ from pathlib import Path
9
+
10
+ # Ensure project root is on path (fixes ModuleNotFoundError when run from /app or other cwd)
11
+ _root = Path(__file__).resolve().parent
12
+ if str(_root) not in sys.path:
13
+ sys.path.insert(0, str(_root))
14
+
15
  import os
16
  from contextlib import asynccontextmanager
17
  import httpx