tensorgirl commited on
Commit
6cae712
·
verified ·
1 Parent(s): 09763c6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -3
main.py CHANGED
@@ -35,15 +35,19 @@ def input_pdf_text(uploaded_file):
35
  return text
36
 
37
 
 
 
 
 
38
  @app.post("/resume_parser/")
39
- async def process_pdf_file(file: UploadFile = File(...)):
40
  contents = await file.read()
41
  with open(file.filename, 'wb') as f:
42
  f.write(contents)
43
 
44
- return await process_pdf(file.filename)
45
 
46
- async def process_pdf(pdf_source):
47
 
48
  text=input_pdf_text(pdf_source)
49
  response=get_gemini_repsonse(input_prompt)
 
35
  return text
36
 
37
 
38
+ @app.get("/")
39
+ async def root():
40
+ return {"Text Emotion Classification":"Version 1.5 'Text'"}
41
+
42
  @app.post("/resume_parser/")
43
+ def process_pdf_file(file: UploadFile = File(...)):
44
  contents = await file.read()
45
  with open(file.filename, 'wb') as f:
46
  f.write(contents)
47
 
48
+ return process_pdf(file.filename)
49
 
50
+ def process_pdf(pdf_source):
51
 
52
  text=input_pdf_text(pdf_source)
53
  response=get_gemini_repsonse(input_prompt)