Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- modules/nodes/init.py +1 -0
- server.py +3 -1
modules/nodes/init.py
CHANGED
|
@@ -127,6 +127,7 @@ The following format should be used to show only the most relevant match. Do not
|
|
| 127 |
- Output should only be the **cleaned, original verses**.
|
| 128 |
- The output in this section **MUST** be in native script not {user_preferred_language} or transliterated {user_preferred_language}.
|
| 129 |
> If you are unsure about a character, leave it as it is rather than guessing.
|
|
|
|
| 130 |
|
| 131 |
|
| 132 |
### 📜 {user_preferred_language} Transliteration(s)
|
|
|
|
| 127 |
- Output should only be the **cleaned, original verses**.
|
| 128 |
- The output in this section **MUST** be in native script not {user_preferred_language} or transliterated {user_preferred_language}.
|
| 129 |
> If you are unsure about a character, leave it as it is rather than guessing.
|
| 130 |
+
> if the final sanitized text turns out to be same as the original text, then you MUST SKIP this section - DO NOT DUPLICATE THIS.
|
| 131 |
|
| 132 |
|
| 133 |
### 📜 {user_preferred_language} Transliteration(s)
|
server.py
CHANGED
|
@@ -15,6 +15,7 @@ router = APIRouter()
|
|
| 15 |
thread_map = {}
|
| 16 |
|
| 17 |
class Message(BaseModel):
|
|
|
|
| 18 |
text: str
|
| 19 |
session_id: str | None = None # Optional session ID from client
|
| 20 |
|
|
@@ -48,7 +49,8 @@ async def handle_chat(msg: Message, request: Request):
|
|
| 48 |
debug_mode=False,
|
| 49 |
message=msg.text,
|
| 50 |
history=None,
|
| 51 |
-
thread_id=thread_id
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
# Return both reply and session_id to the client
|
|
|
|
| 15 |
thread_map = {}
|
| 16 |
|
| 17 |
class Message(BaseModel):
|
| 18 |
+
language: str
|
| 19 |
text: str
|
| 20 |
session_id: str | None = None # Optional session ID from client
|
| 21 |
|
|
|
|
| 49 |
debug_mode=False,
|
| 50 |
message=msg.text,
|
| 51 |
history=None,
|
| 52 |
+
thread_id=thread_id,
|
| 53 |
+
preferred_language=msg.language or "English"
|
| 54 |
)
|
| 55 |
|
| 56 |
# Return both reply and session_id to the client
|