Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -12,6 +12,7 @@ def execute_sql(user_query): | |
| 12 |  | 
| 13 | 
             
                return response
         | 
| 14 |  | 
|  | |
| 15 | 
             
            def chatbot_response(user_message):
         | 
| 16 | 
             
                # Your chatbot code goes here (using GPT-2 or any other text generation model)
         | 
| 17 | 
             
                # For example, you can use the GPT-2 code from the previous responses
         | 
| @@ -28,6 +29,7 @@ chatbot_interface = gr.Interface( | |
| 28 | 
             
                title="Chatbot",
         | 
| 29 | 
             
                description="Type your message in the box above, and the chatbot will respond.",
         | 
| 30 | 
             
            )
         | 
|  | |
| 31 |  | 
| 32 | 
             
            sql_execution_interface = gr.Interface(
         | 
| 33 | 
             
                fn=execute_sql,
         | 
| @@ -40,7 +42,7 @@ sql_execution_interface = gr.Interface( | |
| 40 | 
             
            )
         | 
| 41 |  | 
| 42 | 
             
            # Combine the chatbot and SQL execution interfaces
         | 
| 43 | 
            -
            combined_interface = gr.Interface([chatbot_interface, sql_execution_interface], layout="horizontal")
         | 
| 44 |  | 
| 45 | 
             
            # Launch the combined Gradio interface
         | 
| 46 | 
             
            if __name__ == "__main__":
         | 
|  | |
| 12 |  | 
| 13 | 
             
                return response
         | 
| 14 |  | 
| 15 | 
            +
            '''
         | 
| 16 | 
             
            def chatbot_response(user_message):
         | 
| 17 | 
             
                # Your chatbot code goes here (using GPT-2 or any other text generation model)
         | 
| 18 | 
             
                # For example, you can use the GPT-2 code from the previous responses
         | 
|  | |
| 29 | 
             
                title="Chatbot",
         | 
| 30 | 
             
                description="Type your message in the box above, and the chatbot will respond.",
         | 
| 31 | 
             
            )
         | 
| 32 | 
            +
            '''
         | 
| 33 |  | 
| 34 | 
             
            sql_execution_interface = gr.Interface(
         | 
| 35 | 
             
                fn=execute_sql,
         | 
|  | |
| 42 | 
             
            )
         | 
| 43 |  | 
| 44 | 
             
            # Combine the chatbot and SQL execution interfaces
         | 
| 45 | 
            +
            #combined_interface = gr.Interface([chatbot_interface, sql_execution_interface], layout="horizontal")
         | 
| 46 |  | 
| 47 | 
             
            # Launch the combined Gradio interface
         | 
| 48 | 
             
            if __name__ == "__main__":
         |