MohitGupta41 commited on
Commit ·
f03de96
1
Parent(s): a433621
Add application file
Browse files
app.py
CHANGED
|
@@ -97,7 +97,12 @@ def load_profile_md() -> str:
|
|
| 97 |
return f.read()
|
| 98 |
return ""
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
# print(PROFILE_MD)
|
| 102 |
|
| 103 |
SYSTEM_PROMPT = f"""You are Mohit Gupta's AI voice twin, built to assist in interviews and Q&A sessions.
|
|
@@ -156,7 +161,7 @@ async def on_start():
|
|
| 156 |
logger.warning("Ollama not ready after wait; requests may fail.")
|
| 157 |
|
| 158 |
@app.get("/")
|
| 159 |
-
def
|
| 160 |
return JSONResponse({"ok": True, "message": "Voice Agent API"})
|
| 161 |
|
| 162 |
@app.get("/api/health")
|
|
|
|
| 97 |
return f.read()
|
| 98 |
return ""
|
| 99 |
|
| 100 |
+
def load_profile_text():
|
| 101 |
+
with open("Data/profile_data.txt", "r", encoding="utf-8") as f:
|
| 102 |
+
return f.read()
|
| 103 |
+
|
| 104 |
+
# PROFILE_MD = load_profile_md()
|
| 105 |
+
PROFILE_MD = load_profile_text()
|
| 106 |
# print(PROFILE_MD)
|
| 107 |
|
| 108 |
SYSTEM_PROMPT = f"""You are Mohit Gupta's AI voice twin, built to assist in interviews and Q&A sessions.
|
|
|
|
| 161 |
logger.warning("Ollama not ready after wait; requests may fail.")
|
| 162 |
|
| 163 |
@app.get("/")
|
| 164 |
+
def root():
|
| 165 |
return JSONResponse({"ok": True, "message": "Voice Agent API"})
|
| 166 |
|
| 167 |
@app.get("/api/health")
|