Yokky009 commited on
Commit
a4c7cfa
·
verified ·
1 Parent(s): 6fd7b13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -88,7 +88,12 @@ def respond(
88
 
89
  # 生成されたテキストをデコード
90
  generated = tokenizer.decode(outputs[0], skip_special_tokens=True)
91
-
 
 
 
 
 
92
  # 応答部分のみを抽出
93
  full_response = generated[len(conversation):].strip()
94
 
 
88
 
89
  # 生成されたテキストをデコード
90
  generated = tokenizer.decode(outputs[0], skip_special_tokens=True)
91
+
92
+ # 変換できるかテスト用!!
93
+ import json
94
+ # レスポンス用の辞書を作るときに
95
+ return json.dumps({"result": generated}, ensure_ascii=False)
96
+
97
  # 応答部分のみを抽出
98
  full_response = generated[len(conversation):].strip()
99