ZennyKenny commited on
Commit
0380e03
·
verified ·
1 Parent(s): 2d636d1

add demo instantiation

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def query_sql(user_query):
47
  return sql_engine(user_query)
48
 
49
  # Define Gradio interface
50
- iface = gr.Interface(
51
  fn=query_sql,
52
  inputs=gr.Textbox(label="Enter your SQL Query"),
53
  outputs=gr.Textbox(label="Query Result"),
@@ -58,4 +58,4 @@ iface = gr.Interface(
58
 
59
  # Launch the app
60
  if __name__ == "__main__":
61
- launch(server_name="0.0.0.0", server_port=7860, share=True)
 
47
  return sql_engine(user_query)
48
 
49
  # Define Gradio interface
50
+ demo = gr.Interface(
51
  fn=query_sql,
52
  inputs=gr.Textbox(label="Enter your SQL Query"),
53
  outputs=gr.Textbox(label="Query Result"),
 
58
 
59
  # Launch the app
60
  if __name__ == "__main__":
61
+ demo.launch(server_name="0.0.0.0", server_port=7860, share=True)