aixsatoshi commited on
Commit
1aebd88
1 Parent(s): fef6f02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -85,8 +85,11 @@ def respond(
85
  messages.add_message(user)
86
  messages.add_message(assistant)
87
 
 
 
 
88
  stream = agent.get_chat_response(
89
- message,
90
  llm_sampling_settings=settings,
91
  chat_history=messages,
92
  returns_streaming_generator=True,
@@ -98,6 +101,7 @@ def respond(
98
  outputs += output
99
  yield outputs
100
 
 
101
  description = """<p align="center">Defaults to 27B it (you can switch to 9b it from additional inputs)</p>
102
  <p><center>
103
  <a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">[27B it Model]</a>
 
85
  messages.add_message(user)
86
  messages.add_message(assistant)
87
 
88
+ # ユーザーのメッセージに指示プロンプトを追加
89
+ message_with_prompt = message + "\n\n日本語に翻訳してください。"
90
+
91
  stream = agent.get_chat_response(
92
+ message_with_prompt,
93
  llm_sampling_settings=settings,
94
  chat_history=messages,
95
  returns_streaming_generator=True,
 
101
  outputs += output
102
  yield outputs
103
 
104
+
105
  description = """<p align="center">Defaults to 27B it (you can switch to 9b it from additional inputs)</p>
106
  <p><center>
107
  <a href="https://huggingface.co/google/gemma-2-27b-it" target="_blank">[27B it Model]</a>