muhammadasim117 commited on
Commit
8637650
·
verified ·
1 Parent(s): 93dcd97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -18,16 +18,18 @@ def electrical_engineering():
18
  def generative_ai():
19
  return render_template('generative_ai.html')
20
 
21
- # Gradio Interface
22
  def run_flask_app():
23
  app.run(debug=False, host="0.0.0.0", port=7860)
24
 
 
25
  iface = gr.Interface(
26
- fn=run_flask_app,
27
  inputs=None,
28
- outputs=None,
29
  live=True
30
  )
31
 
 
32
  if __name__ == '__main__':
33
- iface.launch()
 
18
  def generative_ai():
19
  return render_template('generative_ai.html')
20
 
21
+ # Gradio Interface to serve the Flask app
22
  def run_flask_app():
23
  app.run(debug=False, host="0.0.0.0", port=7860)
24
 
25
+ # Create a Gradio interface with a dummy input/output
26
  iface = gr.Interface(
27
+ fn=lambda: "Flask app is running!",
28
  inputs=None,
29
+ outputs="text",
30
  live=True
31
  )
32
 
33
+ # Launch the Flask app using Gradio
34
  if __name__ == '__main__':
35
+ iface.launch(server_name="0.0.0.0", server_port=7860)