qianmuuq commited on
Commit
5058875
1 Parent(s): a2c963f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -184,7 +184,7 @@ def getChat(text,model,tokenizer):
184
  transfer = id_transfer[transfer[0]]
185
  ly_transfer = id_lymph_transfer[ly_transfer[0]]
186
  # print(cancer,transfer,ly_transfer)
187
- output = "肿瘤大小:"+size_str+"\n肿瘤大小<>=4cm:"+"无"+"\n"+"病理组织分型:"+cancer+"\n"+"转移:"+transfer+"\n"+"淋巴转移:"+ly_transfer+"\n"
188
 
189
  return output,size_str,size_4,cancer,transfer,ly_transfer
190
 
@@ -210,7 +210,8 @@ tokenizer,model_extra = model_init()
210
  def t5(input):
211
  output,size_str,size_4,cancer,transfer,ly_transfer = getChat(input,model_extra,tokenizer)
212
  # output = pipe_flan(input)
213
- return {"output": output,"size_str":size_str,"size_4":size_4,"cancer":cancer,"transfer":transfer,"ly_transfer":ly_transfer}
 
214
 
215
  app.mount("/", StaticFiles(directory="static", html=True), name="static")
216
 
 
184
  transfer = id_transfer[transfer[0]]
185
  ly_transfer = id_lymph_transfer[ly_transfer[0]]
186
  # print(cancer,transfer,ly_transfer)
187
+ output = "肿瘤大小:"+size_str+"\n肿瘤大小<>=4cm:"+size_4+"\n"+"病理组织分型:"+cancer+"\n"+"转移:"+transfer+"\n"+"淋巴转移:"+ly_transfer+"\n"
188
 
189
  return output,size_str,size_4,cancer,transfer,ly_transfer
190
 
 
210
  def t5(input):
211
  output,size_str,size_4,cancer,transfer,ly_transfer = getChat(input,model_extra,tokenizer)
212
  # output = pipe_flan(input)
213
+ # ,"size_str":size_str,"size_4":size_4,"cancer":cancer,"transfer":transfer,"ly_transfer":ly_transfer
214
+ return {"output": output}
215
 
216
  app.mount("/", StaticFiles(directory="static", html=True), name="static")
217