Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -68,7 +68,7 @@ def demo(): | |
| 68 |  | 
| 69 | 
             
                translation_mode_map = {
         | 
| 70 | 
             
                    "translate": "exact",
         | 
| 71 | 
            -
                    "translate+extend": "approx",
         | 
| 72 | 
             
                }
         | 
| 73 |  | 
| 74 | 
             
                @spaces.GPU(duration=5)
         | 
| @@ -115,7 +115,7 @@ def demo(): | |
| 115 | 
             
                        bad_words_ids=ban_ids,
         | 
| 116 | 
             
                    )
         | 
| 117 | 
             
                    elapsed = time.time() - start_time
         | 
| 118 | 
            -
             | 
| 119 | 
             
                    deocded = ", ".join(
         | 
| 120 | 
             
                        [
         | 
| 121 | 
             
                            tag
         | 
| @@ -191,8 +191,8 @@ def demo(): | |
| 191 | 
             
                                    )
         | 
| 192 |  | 
| 193 | 
             
                            with gr.Column():
         | 
| 194 | 
            -
                                output_translation = gr.Textbox(label="Output | 
| 195 | 
            -
                                output_extension = gr.Textbox(label="Output (extension)", lines=4, interactive=False)
         | 
| 196 | 
             
                                time_elapsed = gr.Markdown(value="")
         | 
| 197 |  | 
| 198 | 
             
                        gr.Examples(
         | 
| @@ -266,7 +266,11 @@ def demo(): | |
| 266 | 
             
                            top_k,
         | 
| 267 | 
             
                            top_p,
         | 
| 268 | 
             
                        ],
         | 
| 269 | 
            -
                        outputs=[ | 
|  | |
|  | |
|  | |
|  | |
| 270 | 
             
                    )
         | 
| 271 |  | 
| 272 | 
             
                ui.launch()
         | 
|  | |
| 68 |  | 
| 69 | 
             
                translation_mode_map = {
         | 
| 70 | 
             
                    "translate": "exact",
         | 
| 71 | 
            +
                    "translate + extend": "approx",
         | 
| 72 | 
             
                }
         | 
| 73 |  | 
| 74 | 
             
                @spaces.GPU(duration=5)
         | 
|  | |
| 115 | 
             
                        bad_words_ids=ban_ids,
         | 
| 116 | 
             
                    )
         | 
| 117 | 
             
                    elapsed = time.time() - start_time
         | 
| 118 | 
            +
                    
         | 
| 119 | 
             
                    deocded = ", ".join(
         | 
| 120 | 
             
                        [
         | 
| 121 | 
             
                            tag
         | 
|  | |
| 191 | 
             
                                    )
         | 
| 192 |  | 
| 193 | 
             
                            with gr.Column():
         | 
| 194 | 
            +
                                output_translation = gr.Textbox(label="Output", lines=4, interactive=False)
         | 
| 195 | 
            +
                                # output_extension = gr.Textbox(label="Output (extension)", lines=4, interactive=False)
         | 
| 196 | 
             
                                time_elapsed = gr.Markdown(value="")
         | 
| 197 |  | 
| 198 | 
             
                        gr.Examples(
         | 
|  | |
| 266 | 
             
                            top_k,
         | 
| 267 | 
             
                            top_p,
         | 
| 268 | 
             
                        ],
         | 
| 269 | 
            +
                        outputs=[
         | 
| 270 | 
            +
                            output_translation, 
         | 
| 271 | 
            +
                            # output_extension, 
         | 
| 272 | 
            +
                            time_elapsed,
         | 
| 273 | 
            +
                        ],
         | 
| 274 | 
             
                    )
         | 
| 275 |  | 
| 276 | 
             
                ui.launch()
         | 
