nitrox commited on
Commit
5ecb399
·
0 Parent(s):

Initial commit with simplified setup for Hugging Face

Browse files
Files changed (5) hide show
  1. .env.example +19 -0
  2. .gitignore +1 -0
  3. README.md +25 -0
  4. server.py +16 -0
  5. static/index.html +1 -0
.env.example ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Server Configuration
2
+ LOG_PATH=/tmp/ten_agent
3
+ LOG_STDOUT=true
4
+ SERVER_PORT=7860
5
+
6
+ # Agora App ID and App Certificate
7
+ AGORA_APP_ID=
8
+ AGORA_APP_CERTIFICATE=
9
+
10
+ # LLM API Keys
11
+ OPENAI_API_KEY=
12
+ OPENAI_API_BASE=https://api.openai.com/v1
13
+ OPENAI_MODEL=gpt-4o
14
+
15
+ # Speech Recognition
16
+ DEEPGRAM_API_KEY=
17
+
18
+ # Text to Speech
19
+ ELEVENLABS_TTS_KEY=
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .env
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: TEN Agent
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: docker
7
+ sdk_version: "latest"
8
+ pinned: false
9
+ ---
10
+
11
+ # TEN Agent на Hugging Face
12
+
13
+ Это деплой TEN Agent на Hugging Face Spaces.
14
+
15
+ ## Требуемые API ключи
16
+
17
+ Для работы TEN Agent вам понадобятся:
18
+ - Agora App ID и App Certificate
19
+ - OpenAI API Key (или любой совместимый с OpenAI LLM)
20
+ - Deepgram API Key для распознавания речи
21
+ - ElevenLabs API Key для синтеза речи
22
+
23
+ ## Документация
24
+
25
+ Подробная документация: [https://doc.theten.ai/ten-agent/overview](https://doc.theten.ai/ten-agent/overview)
server.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ from http.server import HTTPServer, SimpleHTTPRequestHandler
3
+ import os
4
+
5
+ # Получаем порт из переменной окружения PORT или используем 7860 по умолчанию
6
+ port = int(os.environ.get(\
7
+ PORT\, 7860))
8
+
9
+ # Используем SimpleHTTPRequestHandler для обслуживания файлов из текущей директории
10
+ handler = SimpleHTTPRequestHandler
11
+ handler.directory = "./static" # Установка корневой директории для сервера
12
+
13
+ # Запускаем HTTP-сервер
14
+ with HTTPServer(("", port), handler) as httpd:
15
+ print(f"Сервер запущен на порту {port}")
16
+ httpd.serve_forever()
static/index.html ADDED
@@ -0,0 +1 @@
 
 
1
+ <html><head><title>TEN Agent</title></head><body><h1>TEN Agent успешно запущен на Hugging Face!</h1><p>Для полноценной работы необходимо настроить API ключи.</p><p><a href='https://doc.theten.ai/ten-agent/overview'>Официальная документация</a></p></body></html>