Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Commit 
							
							·
						
						881af9d
	
1
								Parent(s):
							
							96a8500
								
reactivate audio_ouput
Browse files
    	
        app.py
    CHANGED
    
    | @@ -435,12 +435,15 @@ def chathmi2(message, history): | |
| 435 | 
             
                try:
         | 
| 436 | 
             
                    output = agent.run(message)
         | 
| 437 | 
             
                    time.sleep(0.3)
         | 
| 438 | 
            -
                    print("History: ", history)
         | 
| 439 | 
             
                    response = output
         | 
| 440 | 
             
                    yield response
         | 
| 441 | 
            -
                     | 
| 442 | 
            -
                     | 
| 443 | 
            -
             | 
|  | |
|  | |
|  | |
|  | |
| 444 | 
             
                except Exception as e:
         | 
| 445 | 
             
                    print("error:", e)
         | 
| 446 |  | 
| @@ -477,7 +480,7 @@ with gr.Blocks() as demo: | |
| 477 | 
             
                )
         | 
| 478 | 
             
                upload_button = gr.UploadButton("Upload File", file_count="multiple")
         | 
| 479 | 
             
                upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
         | 
| 480 | 
            -
             | 
| 481 | 
             
            # demo = gr.Interface(
         | 
| 482 | 
             
            #     chathmi,
         | 
| 483 | 
             
            #     ["text", "state"],
         | 
|  | |
| 435 | 
             
                try:
         | 
| 436 | 
             
                    output = agent.run(message)
         | 
| 437 | 
             
                    time.sleep(0.3)
         | 
|  | |
| 438 | 
             
                    response = output
         | 
| 439 | 
             
                    yield response
         | 
| 440 | 
            +
                    if len(Audio_output) > 0:
         | 
| 441 | 
            +
                        time.sleep(0.5)        
         | 
| 442 | 
            +
                        yield Audio_output
         | 
| 443 | 
            +
                        Audio_output = []
         | 
| 444 | 
            +
                    print("History: ", history)
         | 
| 445 | 
            +
                    print("-" * 20)
         | 
| 446 | 
            +
                    print("-" * 20)
         | 
| 447 | 
             
                except Exception as e:
         | 
| 448 | 
             
                    print("error:", e)
         | 
| 449 |  | 
|  | |
| 480 | 
             
                )
         | 
| 481 | 
             
                upload_button = gr.UploadButton("Upload File", file_count="multiple")
         | 
| 482 | 
             
                upload_button.upload(func_upload_file, [upload_button, main.chatbot], main.chatbot)
         | 
| 483 | 
            +
                
         | 
| 484 | 
             
            # demo = gr.Interface(
         | 
| 485 | 
             
            #     chathmi,
         | 
| 486 | 
             
            #     ["text", "state"],
         |