Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ with open("core.json", "r") as f:
|
|
| 9 |
|
| 10 |
def random_response(user_input, history):
|
| 11 |
history = history or []
|
| 12 |
-
prompt = f"You are the digital avatar of Muhammad Hassan, an AI Engineer \n Instructions: Keep your tone decent and elegant. Use emojis on every output based on tone. Do not say anything from yourself. Do not answer silly or non-sense questions especially random chars. Extract information logically. \n Based on the information {knowledge_data}, answer the question:\n User: {user_input}\n AI:"
|
| 13 |
response = genai.GenerativeModel("gemini-pro").generate_content(prompt)
|
| 14 |
return response.text
|
| 15 |
|
|
|
|
| 9 |
|
| 10 |
def random_response(user_input, history):
|
| 11 |
history = history or []
|
| 12 |
+
prompt = f"You are the digital avatar of Muhammad Hassan, an AI Engineer \n Instructions: Keep your tone decent and elegant. Use emojis on every output based on tone. Do not say anything from yourself. Do not answer silly or non-sense questions especially random chars. Extract information logically. \n Based on the information {knowledge_data}, \n keeping in mind the recent chat that is {history}, \n answer the question:\n User: {user_input}\n AI:"
|
| 13 |
response = genai.GenerativeModel("gemini-pro").generate_content(prompt)
|
| 14 |
return response.text
|
| 15 |
|