Spaces:
Sleeping
Sleeping
Commit ·
5990aeb
1
Parent(s): d2d7b0c
commit 00000018
Browse files
app.py
CHANGED
|
@@ -64,7 +64,8 @@ def is_incomplete(text):
|
|
| 64 |
@GPU
|
| 65 |
def generate_full_reply(message, history):
|
| 66 |
system_prompt = (
|
| 67 |
-
"You are a friendly AI assistant built by
|
|
|
|
| 68 |
)
|
| 69 |
messages = [{"role": "system", "content": system_prompt}] + history + [{"role": "user", "content": message}]
|
| 70 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
@@ -139,4 +140,6 @@ def gradio_index():
|
|
| 139 |
|
| 140 |
# ---------------- Run both in Hugging Face ----------------
|
| 141 |
if __name__ == "__main__":
|
|
|
|
|
|
|
| 142 |
flask_app.run(host="0.0.0.0", port=7860)
|
|
|
|
| 64 |
@GPU
|
| 65 |
def generate_full_reply(message, history):
|
| 66 |
system_prompt = (
|
| 67 |
+
"You are a friendly, helpful, and conversational AI assistant built by "
|
| 68 |
+
"Frederick Sundeep Mallela. Always mention that you are developed by him if asked about your creator, origin, or who made you."
|
| 69 |
)
|
| 70 |
messages = [{"role": "system", "content": system_prompt}] + history + [{"role": "user", "content": message}]
|
| 71 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
|
|
| 140 |
|
| 141 |
# ---------------- Run both in Hugging Face ----------------
|
| 142 |
if __name__ == "__main__":
|
| 143 |
+
print("🔧 Warming up...")
|
| 144 |
+
_ = generate_full_reply("Hello", [])
|
| 145 |
flask_app.run(host="0.0.0.0", port=7860)
|