Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -95,9 +95,8 @@ def response(audio: tuple[int, np.ndarray], conversation: list[dict], img: str | 
     | 
|
| 95 | 
         
             
                                    elif b'Content-Type: text/plain' in frame:
         
     | 
| 96 | 
         
             
                                        text_data = frame.split(b'\r\n\r\n', 1)[1].decode()
         
     | 
| 97 | 
         
             
                                        resp_text += text_data
         
     | 
| 98 | 
         
            -
             
     | 
| 99 | 
         
            -
             
     | 
| 100 | 
         
            -
                                            yield AdditionalOutputs(conversation)
         
     | 
| 101 | 
         
             
                        except Exception as e:
         
     | 
| 102 | 
         
             
                           raise Exception(f"Error during audio streaming: {e}") from e
         
     | 
| 103 | 
         | 
| 
         | 
|
| 95 | 
         
             
                                    elif b'Content-Type: text/plain' in frame:
         
     | 
| 96 | 
         
             
                                        text_data = frame.split(b'\r\n\r\n', 1)[1].decode()
         
     | 
| 97 | 
         
             
                                        resp_text += text_data
         
     | 
| 98 | 
         
            +
                            conversation[-1]["content"] = resp_text
         
     | 
| 99 | 
         
            +
                             yield AdditionalOutputs(conversation)
         
     | 
| 
         | 
|
| 100 | 
         
             
                        except Exception as e:
         
     | 
| 101 | 
         
             
                           raise Exception(f"Error during audio streaming: {e}") from e
         
     | 
| 102 | 
         |