Spaces:
Paused
Paused
FranklinWillemen
commited on
Commit
•
8683458
1
Parent(s):
fa87f0a
environment secrets
Browse files- .github/workflows/main.yml +2 -0
- .gitignore +0 -1
- app.py +3 -3
- config.py +3 -0
- requirements.txt +1 -0
.github/workflows/main.yml
CHANGED
@@ -17,4 +17,6 @@ jobs:
|
|
17 |
- name: Push to hub
|
18 |
env:
|
19 |
HF: ${{ secrets.HG }}
|
|
|
|
|
20 |
run: git push https://FranklinWillemen:$HF@huggingface.co/spaces/FranklinWillemen/TARS main
|
|
|
17 |
- name: Push to hub
|
18 |
env:
|
19 |
HF: ${{ secrets.HG }}
|
20 |
+
OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }}
|
21 |
+
AZURE_KEY: ${{ secrets.AZURE_SPEECH_KEY }}
|
22 |
run: git push https://FranklinWillemen:$HF@huggingface.co/spaces/FranklinWillemen/TARS main
|
.gitignore
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
config.py
|
2 |
TARS-ENV/
|
3 |
|
4 |
# Byte-compiled / optimized / DLL files
|
|
|
|
|
1 |
TARS-ENV/
|
2 |
|
3 |
# Byte-compiled / optimized / DLL files
|
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
import openai
|
3 |
import config
|
4 |
-
|
5 |
import azure.cognitiveservices.speech as speechsdk
|
6 |
|
7 |
-
openai.api_key =
|
8 |
|
9 |
-
speech_config = speechsdk.SpeechConfig(subscription=
|
10 |
speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
|
11 |
speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
|
12 |
|
|
|
1 |
import gradio as gr
|
2 |
import openai
|
3 |
import config
|
4 |
+
import os
|
5 |
import azure.cognitiveservices.speech as speechsdk
|
6 |
|
7 |
+
openai.api_key = os.environ['OPEN_AI_KEY']
|
8 |
|
9 |
+
speech_config = speechsdk.SpeechConfig(subscription=os.environ['AZURE_SPEECH_KEY'], region="westeurope")
|
10 |
speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
|
11 |
speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
|
12 |
|
config.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
TARS_LOGO = "images/TARS-Logo.png"
|
2 |
+
LOGO_IMAGE_WIDTH = 360
|
3 |
+
LOGO_IMAGE_HEIGHT = 360
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
openai
|
2 |
gradio
|
3 |
azure-cognitiveservices-speech
|
|
|
1 |
+
os
|
2 |
openai
|
3 |
gradio
|
4 |
azure-cognitiveservices-speech
|