uyen13 commited on
Commit
a7b50a5
·
1 Parent(s): 692c381

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -9
app.py CHANGED
@@ -1,14 +1,26 @@
1
- import flask
2
  import os
3
- from dotenv import load_dotenv
4
- load_dotenv()
 
5
 
6
- app = flask.Flask(__name__, template_folder="./")
7
 
 
 
8
 
9
- @app.route('/')
10
- def index():
11
- return flask.render_template('index.html')
12
 
13
- if __name__ == '__main__':
14
- app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import os
2
+ import requests
3
+ import json
4
+ from io import BytesIO
5
 
6
+ from flask import Flask, jsonify, render_template, request, send_file
7
 
8
+ from modules.inference import infer_t5
9
+ from modules.dataset import query_emotion
10
 
11
+ # https://huggingface.co/settings/tokens
12
+ # https://huggingface.co/spaces/{username}/{space}/settings
 
13
 
14
+ app = Flask(__name__)
15
+
16
+
17
+
18
+ @app.route("/query_emotion")
19
+ def emotion():
20
+
21
+
22
+ return jsonify({"output": "output"})
23
+
24
+
25
+ if __name__ == "__main__":
26
+ app.run(host="0.0.0.0", port=7860)