Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Update app.py
Browse filesdebugging file uploader
    	
        app.py
    CHANGED
    
    | @@ -30,8 +30,6 @@ def question_model(): | |
| 30 |  | 
| 31 | 
             
            # get the answer by passing the context & question to the model
         | 
| 32 | 
             
            def question_answering(context, question):
         | 
| 33 | 
            -
                ansList = []
         | 
| 34 | 
            -
                contextList = []
         | 
| 35 | 
             
                with st.spinner(text="Loading question model..."):
         | 
| 36 | 
             
                    question_answerer = question_model()
         | 
| 37 | 
             
                with st.spinner(text="Getting answer..."):
         | 
| @@ -62,6 +60,7 @@ def extract_text(file_path): | |
| 62 |  | 
| 63 | 
             
                    # text = text + image_text
         | 
| 64 | 
             
                    text = image_text
         | 
|  | |
| 65 | 
             
                return text
         | 
| 66 |  | 
| 67 |  | 
|  | |
| 30 |  | 
| 31 | 
             
            # get the answer by passing the context & question to the model
         | 
| 32 | 
             
            def question_answering(context, question):
         | 
|  | |
|  | |
| 33 | 
             
                with st.spinner(text="Loading question model..."):
         | 
| 34 | 
             
                    question_answerer = question_model()
         | 
| 35 | 
             
                with st.spinner(text="Getting answer..."):
         | 
|  | |
| 60 |  | 
| 61 | 
             
                    # text = text + image_text
         | 
| 62 | 
             
                    text = image_text
         | 
| 63 | 
            +
                    text = text.replace("\n", " ")
         | 
| 64 | 
             
                return text
         | 
| 65 |  | 
| 66 |  |