Fix multiple rounds of conversations in web_demo

This commit is contained in:
Hongji Zhu
2024-05-29 11:37:23 +08:00
parent 573844b146
commit e88df8f04d
2 changed files with 2 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ def chat(img, msgs, ctx, params=None, vision_hidden_states=None):
res = res.replace('</ref>', '')
res = res.replace('<box>', '')
answer = res.replace('</box>', '')
return -1, answer, None, None
return 0, answer, None, None
except Exception as err:
print(err)
traceback.print_exc()

View File

@@ -151,7 +151,7 @@ def chat(img, msgs, ctx, params=None, vision_hidden_states=None):
res = res.replace('</ref>', '')
res = res.replace('<box>', '')
answer = res.replace('</box>', '')
return -1, answer, None, None
return 0, answer, None, None
except Exception as err:
print(err)
traceback.print_exc()