ApsidalSolid4 commited on
Commit
c3fb048
·
verified ·
1 Parent(s): f1102ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -357,6 +357,15 @@ demo = gr.Interface(
357
  flagging_mode="never" # Updated from allow_flagging
358
  )
359
 
 
 
 
 
 
 
 
 
 
360
  # Launch the interface
361
  if __name__ == "__main__":
362
  demo.queue() # Enable queuing
 
357
  flagging_mode="never" # Updated from allow_flagging
358
  )
359
 
360
+ app = demo.app
361
+ app.add_middleware(
362
+ CORSMiddleware,
363
+ allow_origins=["*"], # For development - in production, specify exact domains
364
+ allow_credentials=True,
365
+ allow_methods=["*"],
366
+ allow_headers=["*"],
367
+ )
368
+
369
  # Launch the interface
370
  if __name__ == "__main__":
371
  demo.queue() # Enable queuing