Arafath10 commited on
Commit
55dc24c
·
verified ·
1 Parent(s): c6a4a5b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -79,7 +79,7 @@ def vision(file_content):
79
 
80
  @app.post("/get_ocr_data/")
81
  async def get_data(input_file: UploadFile = File(...)):
82
- try:
83
  # Determine the file type by reading the first few bytes
84
  file_content = await input_file.read()
85
  file_type = input_file.content_type
@@ -109,5 +109,5 @@ async def get_data(input_file: UploadFile = File(...)):
109
  data = json.loads(response.text.replace("```json", "").replace("```", ""))
110
  return {"data": data}
111
 
112
- except Exception as e:
113
- raise HTTPException(status_code=500, detail=f"Error processing file: {str(e)}")
 
79
 
80
  @app.post("/get_ocr_data/")
81
  async def get_data(input_file: UploadFile = File(...)):
82
+ #try:
83
  # Determine the file type by reading the first few bytes
84
  file_content = await input_file.read()
85
  file_type = input_file.content_type
 
109
  data = json.loads(response.text.replace("```json", "").replace("```", ""))
110
  return {"data": data}
111
 
112
+ #except Exception as e:
113
+ #raise HTTPException(status_code=500, detail=f"Error processing file: {str(e)}")