Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def generate_response(message, history):
|
|
| 24 |
|
| 25 |
# synth,cot composite — reasoning / CoT style (see Disclaimer for other modes)
|
| 26 |
condition = "<|quad_end|><|object_ref_end|>"
|
| 27 |
-
|
| 28 |
|
| 29 |
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 30 |
# Mark the prompt as a single bidirectional prefix block — see "PrefixLM mask" below.
|
|
@@ -36,8 +36,8 @@ def generate_response(message, history):
|
|
| 36 |
chatbot = gr.ChatInterface(
|
| 37 |
fn=generate_response,
|
| 38 |
title="Simple ZeroGPU Chatbot",
|
| 39 |
-
description="A simple chatbot using
|
| 40 |
-
examples=["
|
| 41 |
)
|
| 42 |
|
| 43 |
if __name__ == "__main__":
|
|
|
|
| 24 |
|
| 25 |
# synth,cot composite — reasoning / CoT style (see Disclaimer for other modes)
|
| 26 |
condition = "<|quad_end|><|object_ref_end|>"
|
| 27 |
+
prompt = f"<|im_start|>{condition}{history} {message}<|im_end|>"
|
| 28 |
|
| 29 |
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 30 |
# Mark the prompt as a single bidirectional prefix block — see "PrefixLM mask" below.
|
|
|
|
| 36 |
chatbot = gr.ChatInterface(
|
| 37 |
fn=generate_response,
|
| 38 |
title="Simple ZeroGPU Chatbot",
|
| 39 |
+
description="A simple chatbot using HRM-Text, running on Hugging Face ZeroGPU.",
|
| 40 |
+
examples=["Explain why the sky is blue?", "Introduce yourself?", "What's the latest news?"]
|
| 41 |
)
|
| 42 |
|
| 43 |
if __name__ == "__main__":
|