linzhengyu commited on
Commit
80dffca
·
1 Parent(s): 6f2fa1b

feat: allow submit eval to backend, allow json file upload

Browse files
src/backend/routes/hf.py CHANGED
@@ -107,5 +107,4 @@ async def community_submit(
107
  repo_id=settings.REQUESTS_REPO_ID,
108
  repo_type="dataset",
109
  )
110
- print(params)
111
- return ResponseData(data=None)
 
107
  repo_id=settings.REQUESTS_REPO_ID,
108
  repo_type="dataset",
109
  )
110
+ return ResponseData(data=data)
 
src/submission/submit.py CHANGED
@@ -94,11 +94,10 @@ def add_new_submit(
94
  json=request_json, # 使用 json 参数发送 JSON body
95
  headers={"Content-Type": "application/json"}
96
  )
97
- print(request_json)
98
- print(response.json())
99
  if response.status_code == 200:
100
  data = response.json()
101
  if data.get("code") == 0:
 
102
  return styled_message(
103
  "Your request has been submitted to the evaluation queue!\nPlease wait for the model to show in the PENDING list."
104
  )
 
94
  json=request_json, # 使用 json 参数发送 JSON body
95
  headers={"Content-Type": "application/json"}
96
  )
 
 
97
  if response.status_code == 200:
98
  data = response.json()
99
  if data.get("code") == 0:
100
+ print("returned data: ", data)
101
  return styled_message(
102
  "Your request has been submitted to the evaluation queue!\nPlease wait for the model to show in the PENDING list."
103
  )