Update app.py
Browse files
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 |
|