yuripeyamashita
commited on
Commit
•
074798d
1
Parent(s):
d56826c
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
from flask import Flask
|
2 |
from time import sleep
|
|
|
3 |
|
4 |
app = Flask(__name__)
|
5 |
|
|
|
|
|
|
|
|
|
6 |
|
7 |
@app.route("/")
|
8 |
def index():
|
9 |
-
|
10 |
-
|
|
|
11 |
|
12 |
if __name__ == "__main__":
|
13 |
app.run(host="0.0.0.0", port=7860)
|
|
|
1 |
from flask import Flask
|
2 |
from time import sleep
|
3 |
+
import requests
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
+
headers = {
|
8 |
+
'Authorization': os.environ.get("auth"),
|
9 |
+
},
|
10 |
+
|
11 |
|
12 |
@app.route("/")
|
13 |
def index():
|
14 |
+
url = 'https://yuripeyamashita-fetch2.hf.space/'
|
15 |
+
response = requests.get(url, headers=headers)
|
16 |
+
return response.json
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
app.run(host="0.0.0.0", port=7860)
|