Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
sachin
commited on
Commit
·
643e32f
1
Parent(s):
a085089
updatepath
Browse files- .env.server +3 -3
- docs/menv.md +3 -3
- src/server/main.py +2 -2
.env.server
CHANGED
@@ -2,8 +2,8 @@ PORT=7860
|
|
2 |
HOST=0.0.0.0
|
3 |
SPEECH_RATE_LIMIT=5/minute
|
4 |
CHAT_RATE_LIMIT=100/minute
|
5 |
-
EXTERNAL_TTS_URL=https://
|
6 |
EXTERNAL_ASR_URL=https://gaganyatri-asr-indic-server-cpu.hf.space
|
7 |
-
EXTERNAL_TEXT_GEN_URL=https://
|
8 |
-
EXTERNAL_AUDIO_PROC_URL=https://
|
9 |
API_KEY_SECRET=your_secret_key
|
|
|
2 |
HOST=0.0.0.0
|
3 |
SPEECH_RATE_LIMIT=5/minute
|
4 |
CHAT_RATE_LIMIT=100/minute
|
5 |
+
EXTERNAL_TTS_URL=https://slabstech-dhwani-internal-api-server.hf.space/v1/audio/speech
|
6 |
EXTERNAL_ASR_URL=https://gaganyatri-asr-indic-server-cpu.hf.space
|
7 |
+
EXTERNAL_TEXT_GEN_URL=https://slabstech-dhwani-internal-api-server.hf.space/v1/audio/speech
|
8 |
+
EXTERNAL_AUDIO_PROC_URL=https://slabstech-dhwani-internal-api-server.hf.space/v1/audio/speech
|
9 |
API_KEY_SECRET=your_secret_key
|
docs/menv.md
CHANGED
@@ -2,8 +2,8 @@ export PORT=7860
|
|
2 |
export HOST=0.0.0.0
|
3 |
export SPEECH_RATE_LIMIT=5/minute
|
4 |
export CHAT_RATE_LIMIT=100/minute
|
5 |
-
export EXTERNAL_TTS_URL=https://
|
6 |
export EXTERNAL_ASR_URL=https://gaganyatri-asr-indic-server-cpu.hf.space
|
7 |
-
export EXTERNAL_TEXT_GEN_URL=https://
|
8 |
-
export EXTERNAL_AUDIO_PROC_URL=https://
|
9 |
export API_KEY_SECRET=your_secret_key
|
|
|
2 |
export HOST=0.0.0.0
|
3 |
export SPEECH_RATE_LIMIT=5/minute
|
4 |
export CHAT_RATE_LIMIT=100/minute
|
5 |
+
export EXTERNAL_TTS_URL=https://slabstech-dhwani-internal-api-server.hf.space/v1/audio/speech
|
6 |
export EXTERNAL_ASR_URL=https://gaganyatri-asr-indic-server-cpu.hf.space
|
7 |
+
export EXTERNAL_TEXT_GEN_URL=https://gaganyatri-asr-indic-server-cpu.hf.space
|
8 |
+
export EXTERNAL_AUDIO_PROC_URL=https://gaganyatri-asr-indic-server-cpu.hf.space
|
9 |
export API_KEY_SECRET=your_secret_key
|
src/server/main.py
CHANGED
@@ -192,7 +192,7 @@ async def chat(request: Request, chat_request: ChatRequest):
|
|
192 |
try:
|
193 |
|
194 |
# Call the external API instead of llm_manager.generate
|
195 |
-
external_url = "https://
|
196 |
payload = {
|
197 |
"prompt": chat_request.prompt ,
|
198 |
"src_lang": chat_request.src_lang,
|
@@ -343,7 +343,7 @@ async def translate(request: TranslationRequest):
|
|
343 |
logger.info(f"Received translation request: {request.dict()}")
|
344 |
|
345 |
# External API endpoint
|
346 |
-
external_url = f"https://
|
347 |
|
348 |
# Prepare the payload matching the external API's expected format
|
349 |
payload = {
|
|
|
192 |
try:
|
193 |
|
194 |
# Call the external API instead of llm_manager.generate
|
195 |
+
external_url = "https://slabstech-dhwani-internal-api-server.hf.space/v1/chat"
|
196 |
payload = {
|
197 |
"prompt": chat_request.prompt ,
|
198 |
"src_lang": chat_request.src_lang,
|
|
|
343 |
logger.info(f"Received translation request: {request.dict()}")
|
344 |
|
345 |
# External API endpoint
|
346 |
+
external_url = f"https://slabstech-dhwani-internal-api-server.hf.space/translate?src_lang={request.src_lang}&tgt_lang={request.tgt_lang}"
|
347 |
|
348 |
# Prepare the payload matching the external API's expected format
|
349 |
payload = {
|