Nithin1905 commited on
Commit
fc32fdf
1 Parent(s): 56de4d2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -1
main.py CHANGED
@@ -28,6 +28,8 @@ import json
28
  import hashlib
29
  from dotenv import load_dotenv
30
  from tenacity import retry, stop_after_attempt, wait_random_exponential
 
 
31
 
32
  load_dotenv()
33
 
@@ -768,6 +770,12 @@ async def process_pdf(file: UploadFile = File(...)):
768
  "grading_results":grading_results
769
  }
770
 
771
-
 
 
 
 
 
 
772
 
773
 
 
28
  import hashlib
29
  from dotenv import load_dotenv
30
  from tenacity import retry, stop_after_attempt, wait_random_exponential
31
+ from fastapi import FastAPI, HTTPException, UploadFile, File,Form
32
+ from fastapi.middleware.cors import CORSMiddleware
33
 
34
  load_dotenv()
35
 
 
770
  "grading_results":grading_results
771
  }
772
 
773
+ app.add_middleware(
774
+ CORSMiddleware,
775
+ allow_origins=["*"],
776
+ allow_credentials=True,
777
+ allow_methods=["*"],
778
+ allow_headers=["*"],
779
+ )
780
 
781