Spaces:
Sleeping
Sleeping
| from flask import Flask, render_template | |
| import gradio as gr | |
| app = Flask(__name__) | |
| # Home Page | |
| def home(): | |
| return render_template('index.html') | |
| # Electrical Engineering Page | |
| def electrical_engineering(): | |
| return render_template('electrical_engineering.html') | |
| # Generative AI Page | |
| def generative_ai(): | |
| return render_template('generative_ai.html') | |
| # Gradio Interface to serve the Flask app | |
| def run_flask_app(): | |
| app.run(debug=False, host="0.0.0.0", port=7860) | |
| # Create a Gradio interface with a dummy input/output | |
| iface = gr.Interface( | |
| fn=lambda: "Flask app is running!", | |
| inputs=None, | |
| outputs="text", | |
| live=True | |
| ) | |
| # Launch the Flask app using Gradio | |
| if __name__ == '__main__': | |
| iface.launch(server_name="0.0.0.0", server_port=7860) |