Update app.py
Browse files
app.py
CHANGED
|
@@ -45,15 +45,17 @@ def get_top_chunks(query):
|
|
| 45 |
|
| 46 |
client = InferenceClient("google/gemma-3-27b-it")
|
| 47 |
|
| 48 |
-
|
|
|
|
| 49 |
}]
|
| 50 |
-
if history:
|
| 51 |
messages.extend(history)
|
| 52 |
|
| 53 |
messages.append({"role" : "user", "content" : message})
|
| 54 |
|
| 55 |
response = ""
|
| 56 |
-
|
|
|
|
| 57 |
messages,
|
| 58 |
max_tokens = 500,
|
| 59 |
stream=True,
|
|
|
|
| 45 |
|
| 46 |
client = InferenceClient("google/gemma-3-27b-it")
|
| 47 |
|
| 48 |
+
def respond(message,history):
|
| 49 |
+
messages = [{"role": "system" , "content": "Your name is BloomBot and you're a supportive and helpful chatbot catered towards teens ages 10-18. You give clear kid-appropiate explainations and keep your explainations to 10 sentences maximum."
|
| 50 |
}]
|
| 51 |
+
if history:
|
| 52 |
messages.extend(history)
|
| 53 |
|
| 54 |
messages.append({"role" : "user", "content" : message})
|
| 55 |
|
| 56 |
response = ""
|
| 57 |
+
|
| 58 |
+
for message in client.chat_completion(
|
| 59 |
messages,
|
| 60 |
max_tokens = 500,
|
| 61 |
stream=True,
|