Ath commited on
Commit
742e58e
1 Parent(s): 5fb1f6a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, request, render_template
2
+
3
+ app = Flask(__name__)
4
+
5
+ @app.route('/')
6
+ def index():
7
+ return render_template('index.html')
8
+
9
+ @app.route('/submit', methods=['POST'])
10
+ def submit():
11
+ user_input = request.form['user_input']
12
+ modified_text = user_input + " hey"
13
+ return render_template('result.html', modified_text=modified_text)
14
+
15
+ if __name__ == '__main__':
16
+ app.run(host="0.0.0.0", port=7860)