Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Commit 
							
							·
						
						4c0f6cd
	
1
								Parent(s):
							
							a8b9f85
								
Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -99,7 +99,7 @@ start_work = """async() => { | |
| 99 | 
             
                                texts = window['gradioEl'].querySelectorAll('textarea');
         | 
| 100 | 
             
                                text0 = texts[0];    
         | 
| 101 | 
             
                                text1 = texts[1];
         | 
| 102 | 
            -
                                if (window['doCheckPrompt'] == 0 && window['prevPrompt']  | 
| 103 | 
             
                                        window['doCheckPrompt'] = 1;
         | 
| 104 | 
             
                                        window['prevPrompt'] = text1.value;
         | 
| 105 | 
             
                                        for (var i = 2; i < texts.length; i++) {
         | 
| @@ -107,12 +107,12 @@ start_work = """async() => { | |
| 107 | 
             
                                            texts[i].dispatchEvent(new Event('input', { bubbles: true }));
         | 
| 108 | 
             
                                        }                        
         | 
| 109 | 
             
                                        setTimeout(function() {
         | 
| 110 | 
            -
                                            text1 = window['gradioEl'].querySelectorAll('textarea')[1]; | 
| 111 |  | 
| 112 | 
             
                                            btns = window['gradioEl'].querySelectorAll('button');
         | 
| 113 | 
             
                                            for (var i = 0; i < btns.length; i++) {
         | 
| 114 | 
             
                                                if (btns[i].innerText == 'Submit') {
         | 
| 115 | 
            -
                                                    btns[i].focus();
         | 
| 116 | 
             
                                                    btns[i].click();                
         | 
| 117 | 
             
                                                }
         | 
| 118 | 
             
                                            }
         | 
|  | |
| 99 | 
             
                                texts = window['gradioEl'].querySelectorAll('textarea');
         | 
| 100 | 
             
                                text0 = texts[0];    
         | 
| 101 | 
             
                                text1 = texts[1];
         | 
| 102 | 
            +
                                if (window['doCheckPrompt'] == 0 && window['prevPrompt'] !== text1.value) {
         | 
| 103 | 
             
                                        window['doCheckPrompt'] = 1;
         | 
| 104 | 
             
                                        window['prevPrompt'] = text1.value;
         | 
| 105 | 
             
                                        for (var i = 2; i < texts.length; i++) {
         | 
|  | |
| 107 | 
             
                                            texts[i].dispatchEvent(new Event('input', { bubbles: true }));
         | 
| 108 | 
             
                                        }                        
         | 
| 109 | 
             
                                        setTimeout(function() {
         | 
| 110 | 
            +
                                            //text1 = window['gradioEl'].querySelectorAll('textarea')[1];   
         | 
| 111 |  | 
| 112 | 
             
                                            btns = window['gradioEl'].querySelectorAll('button');
         | 
| 113 | 
             
                                            for (var i = 0; i < btns.length; i++) {
         | 
| 114 | 
             
                                                if (btns[i].innerText == 'Submit') {
         | 
| 115 | 
            +
                                                    //btns[i].focus();
         | 
| 116 | 
             
                                                    btns[i].click();                
         | 
| 117 | 
             
                                                }
         | 
| 118 | 
             
                                            }
         |