omkar56 commited on
Commit
b39d66b
·
1 Parent(s): 551b199

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -18,7 +18,6 @@ app = FastAPI()
18
  # CORS issue write below code
19
  origins = [
20
  "http://localhost:3000", # Update this with the actual origin of your frontend
21
- # "http://192.168.0.104:3000",
22
  ]
23
  app.add_middleware(
24
  CORSMiddleware,
@@ -42,6 +41,7 @@ async def ocr(
42
  # languages: list = Body(["eng"])
43
  ):
44
  try:
 
45
  # Check if the file format is allowed
46
  file_extension = image.filename.split(".")[-1].lower()
47
  if file_extension not in VALID_IMAGE_EXTENSIONS:
 
18
  # CORS issue write below code
19
  origins = [
20
  "http://localhost:3000", # Update this with the actual origin of your frontend
 
21
  ]
22
  app.add_middleware(
23
  CORSMiddleware,
 
41
  # languages: list = Body(["eng"])
42
  ):
43
  try:
44
+ print("[Hello]", image.filename.split(".")[-1].lower())
45
  # Check if the file format is allowed
46
  file_extension = image.filename.split(".")[-1].lower()
47
  if file_extension not in VALID_IMAGE_EXTENSIONS: