Zayeemk commited on
Commit
8dc1d6e
·
verified ·
1 Parent(s): 69aa668

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -28,7 +28,12 @@ app = FastAPI(
28
  )
29
 
30
  # Configure CORS
31
- origins = os.getenv("ALLOWED_ORIGINS", "http://localhost:5173").split(",")
 
 
 
 
 
32
  app.add_middleware(
33
  CORSMiddleware,
34
  allow_origins=origins,
@@ -37,6 +42,7 @@ app.add_middleware(
37
  allow_headers=["*"],
38
  )
39
 
 
40
  # Initialize components
41
  emotion_detector = EmotionDetector()
42
  ai_insights = AIInsightGenerator()
 
28
  )
29
 
30
  # Configure CORS
31
+ origins = [
32
+ "https://aimirror15.netlify.app", # your frontend
33
+ "http://localhost:5173", # for local testing
34
+ "https://huggingface.co", # Hugging Face itself
35
+ ]
36
+
37
  app.add_middleware(
38
  CORSMiddleware,
39
  allow_origins=origins,
 
42
  allow_headers=["*"],
43
  )
44
 
45
+
46
  # Initialize components
47
  emotion_detector = EmotionDetector()
48
  ai_insights = AIInsightGenerator()