Han Lee
commited on
Commit
·
946dfa0
1
Parent(s):
260e2bc
cred
Browse files- app.py +13 -0
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
"""Deploying AI Voice Chatbot Gradio App."""
|
|
|
|
|
|
|
|
|
2 |
from gradio import Audio, Interface, Textbox
|
3 |
|
4 |
from utils import (TextGenerationPipeline, from_en_translation,
|
@@ -13,6 +17,15 @@ from google.cloud import aiplatform
|
|
13 |
import vertexai
|
14 |
from vertexai.preview.language_models import ChatModel, InputOutputTextPair
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
PROJECT_ID = "youtube-live-checker-245701"
|
17 |
LOCATION = "us-central1"
|
18 |
CHATMODEL ="chat-bison@001"
|
|
|
1 |
"""Deploying AI Voice Chatbot Gradio App."""
|
2 |
+
|
3 |
+
import os
|
4 |
+
import subprocess
|
5 |
+
|
6 |
from gradio import Audio, Interface, Textbox
|
7 |
|
8 |
from utils import (TextGenerationPipeline, from_en_translation,
|
|
|
17 |
import vertexai
|
18 |
from vertexai.preview.language_models import ChatModel, InputOutputTextPair
|
19 |
|
20 |
+
# Imports the Google Cloud client library
|
21 |
+
|
22 |
+
credential_path = "GOOGLE_APPLICATION_CREDENTIALS=~/santa/didso.json"
|
23 |
+
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = credential_path
|
24 |
+
|
25 |
+
# GOOGLE_APPLICATION_CREDENTIALS = os.environ['GOOGLE_APPLICATION_CREDENTIALS']
|
26 |
+
subprocess.call(f"wget --no-check-certificate -O {GOOGLE_APPLICATION_CREDENTIALS}", shell=True)
|
27 |
+
|
28 |
+
|
29 |
PROJECT_ID = "youtube-live-checker-245701"
|
30 |
LOCATION = "us-central1"
|
31 |
CHATMODEL ="chat-bison@001"
|
requirements.txt
CHANGED
@@ -6,4 +6,4 @@ mtranslate==1.8
|
|
6 |
gTTS==2.3.0
|
7 |
transformers==4.25.1
|
8 |
google-cloud-aiplatform
|
9 |
-
vertexai
|
|
|
6 |
gTTS==2.3.0
|
7 |
transformers==4.25.1
|
8 |
google-cloud-aiplatform
|
9 |
+
vertexai
|