Spaces:
Running
Running
File size: 366 Bytes
620d08d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from flask import Flask,request,render_template
import os
app=Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def home():
return render_template
def run_script():
script=request.args.get('script')
os.system(script+' > ./out.txt')
with open('./out.txt','r') as f: output=f.read()
return output
if __name__=='__main__':
app.run()
|