Upload app.py with huggingface_hub
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -11,6 +11,7 @@ with gr.Blocks() as app: 
     | 
|
| 11 | 
         
             
                                component.render()
         
     | 
| 12 | 
         
             
                    with gr.Column(scale=2):
         
     | 
| 13 | 
         
             
                        gr.Image(label="Recording", value="recording.gif")
         
     | 
| 
         | 
|
| 14 | 
         | 
| 15 | 
         
             
                @gr.on(
         
     | 
| 16 | 
         
             
                    triggers=[app.load] + [input.change for input in flow.inputs],
         
     | 
| 
         @@ -22,7 +23,7 @@ with gr.Blocks() as app: 
     | 
|
| 22 | 
         
             
                def construct_prompt(*input_values):
         
     | 
| 23 | 
         
             
                    return flow.task.format(*input_values)
         
     | 
| 24 | 
         | 
| 25 | 
         
            -
                 
     | 
| 26 | 
         | 
| 27 | 
         | 
| 28 | 
         
             
            if __name__ == "__main__":
         
     | 
| 
         | 
|
| 11 | 
         
             
                                component.render()
         
     | 
| 12 | 
         
             
                    with gr.Column(scale=2):
         
     | 
| 13 | 
         
             
                        gr.Image(label="Recording", value="recording.gif")
         
     | 
| 14 | 
         
            +
                        config = gr.JSON(visible=False)
         
     | 
| 15 | 
         | 
| 16 | 
         
             
                @gr.on(
         
     | 
| 17 | 
         
             
                    triggers=[app.load] + [input.change for input in flow.inputs],
         
     | 
| 
         | 
|
| 23 | 
         
             
                def construct_prompt(*input_values):
         
     | 
| 24 | 
         
             
                    return flow.task.format(*input_values)
         
     | 
| 25 | 
         | 
| 26 | 
         
            +
                app.load(flow.to_json, None, config, api_name="flow_config")
         
     | 
| 27 | 
         | 
| 28 | 
         | 
| 29 | 
         
             
            if __name__ == "__main__":
         
     |