yuripeyamashita commited on
Commit
0c973d4
1 Parent(s): 4f21278

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -8,12 +8,15 @@ app = Flask(__name__)
8
  headers = {'Authorization': os.environ.get("auth")}
9
  print(headers)
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)
 
8
  headers = {'Authorization': os.environ.get("auth")}
9
  print(headers)
10
 
11
+ temp = {}
12
 
13
  @app.route("/")
14
  def index():
15
+ p = request.args.get('p', default='default_value') # 提供默認值
16
+ temp[p] = "123"
17
+ # url = 'https://yuripeyamashita-fetch2.hf.space/'
18
+ # response = requests.get(url, headers=headers)
19
+ return temp
20
 
21
  if __name__ == "__main__":
22
  app.run(host="0.0.0.0", port=7860)