# server.py | |
from flask import Flask, render_template | |
import subprocess | |
app = Flask(__name__) | |
def index(): | |
return render_template('index.html') | |
def start_recording(): | |
# Execute the Python script (app.py) with Gradio when the button is pressed | |
subprocess.Popen(["python", "app.py"]) | |
return "Recording started." | |
if __name__ == '__main__': | |
app.run(debug=True) | |