LalitMahale
		
	commited on
		
		
					Commit 
							
							·
						
						cbc2cdd
	
1
								Parent(s):
							
							e1d7951
								
test
Browse files
    	
        app.py
    CHANGED
    
    | @@ -50,6 +50,7 @@ async def chatbot(text: str = "", token: str = ""): | |
| 50 | 
             
                if not text or not token:
         | 
| 51 | 
             
                    raise HTTPException(status_code=400, detail="No text provided")
         | 
| 52 | 
             
                verify_token(token)
         | 
|  | |
| 53 | 
             
                result = process(user_query=text)
         | 
| 54 | 
             
                return {"result": result}
         | 
| 55 |  | 
| @@ -90,7 +91,7 @@ async def upload_base64(file_data: FileUploadRequest): | |
| 90 | 
             
                    with open(file_path, "rb") as f:
         | 
| 91 | 
             
                        extracted_text += repr(f.read(100))
         | 
| 92 |  | 
| 93 | 
            -
                    return {"text":  | 
| 94 |  | 
| 95 | 
             
                except Exception as e:
         | 
| 96 | 
             
                    raise HTTPException(status_code=500, detail=str(e))
         | 
|  | |
| 50 | 
             
                if not text or not token:
         | 
| 51 | 
             
                    raise HTTPException(status_code=400, detail="No text provided")
         | 
| 52 | 
             
                verify_token(token)
         | 
| 53 | 
            +
                print("User_input :- ",text)
         | 
| 54 | 
             
                result = process(user_query=text)
         | 
| 55 | 
             
                return {"result": result}
         | 
| 56 |  | 
|  | |
| 91 | 
             
                    with open(file_path, "rb") as f:
         | 
| 92 | 
             
                        extracted_text += repr(f.read(100))
         | 
| 93 |  | 
| 94 | 
            +
                    return {"text": "api under development"}
         | 
| 95 |  | 
| 96 | 
             
                except Exception as e:
         | 
| 97 | 
             
                    raise HTTPException(status_code=500, detail=str(e))
         |