efaraneda commited on
Commit
6786510
·
verified ·
1 Parent(s): aa89a53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -128,7 +128,7 @@ def nicknames():
128
  random_nickname = random.choice(nombres_chistosos)
129
  return random_nickname
130
 
131
- def interface():
132
  import gradio as gr
133
 
134
  with gr.Blocks() as demo:
@@ -167,4 +167,8 @@ def interface():
167
  msg.submit(respond, [msg, chatbot], [msg, chatbot])
168
 
169
 
170
- demo.launch(share=True)
 
 
 
 
 
128
  random_nickname = random.choice(nombres_chistosos)
129
  return random_nickname
130
 
131
+ def gradio_interface():
132
  import gradio as gr
133
 
134
  with gr.Blocks() as demo:
 
167
  msg.submit(respond, [msg, chatbot], [msg, chatbot])
168
 
169
 
170
+ demo.launch(share=True)
171
+
172
+ if __name__ == "__main__":
173
+ # Start the HTTP server in a separate thread
174
+ gradio_interface()