test2023h5 commited on
Commit
a2e4457
·
verified ·
1 Parent(s): 56d7ab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def predict():
30
 
31
  def inference(input_text, method):
32
  #url = "http://0.0.0.0:8080/process" # 假设POST请求的路径是 /process
33
- url = "https://test2023h5-fastapi-wyw.hf.space/"
34
  data = {"text": input_text, "method": method} # 将 input_text 和 method 作为 JSON 数据发送
35
  res = requests.post(url, json=data) # 发送 POST 请求,传递 JSON 数据
36
  return res.json() # 假设服务器返回 JSON 响应
 
30
 
31
  def inference(input_text, method):
32
  #url = "http://0.0.0.0:8080/process" # 假设POST请求的路径是 /process
33
+ url = "https://test2023h5-fastapi-wyw.hf.space/process"
34
  data = {"text": input_text, "method": method} # 将 input_text 和 method 作为 JSON 数据发送
35
  res = requests.post(url, json=data) # 发送 POST 请求,传递 JSON 数据
36
  return res.json() # 假设服务器返回 JSON 响应