Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ from PIL import Image
|
|
| 12 |
import os
|
| 13 |
|
| 14 |
pkey = os.environ.get("PINECONE_KEY")
|
| 15 |
-
|
| 16 |
|
| 17 |
with open('pinecone_text.py' ,'w') as fb:
|
| 18 |
fb.write(requests.get('https://storage.googleapis.com/gareth-pinecone-datasets/pinecone_text.py').text)
|
|
@@ -135,7 +135,7 @@ img_files = {'x':[]}
|
|
| 135 |
K = 5
|
| 136 |
|
| 137 |
def fake_gan(text, alpha):
|
| 138 |
-
detected_language = single_detection(text, api_key=
|
| 139 |
|
| 140 |
if detected_language == 'iw':
|
| 141 |
text_eng=GoogleTranslator(source='iw', target='en').translate(text)
|
|
|
|
| 12 |
import os
|
| 13 |
|
| 14 |
pkey = os.environ.get("PINECONE_KEY")
|
| 15 |
+
tkey = os.environ.get("TRANSLATE_KEY")
|
| 16 |
|
| 17 |
with open('pinecone_text.py' ,'w') as fb:
|
| 18 |
fb.write(requests.get('https://storage.googleapis.com/gareth-pinecone-datasets/pinecone_text.py').text)
|
|
|
|
| 135 |
K = 5
|
| 136 |
|
| 137 |
def fake_gan(text, alpha):
|
| 138 |
+
detected_language = single_detection(text, api_key=tkey)
|
| 139 |
|
| 140 |
if detected_language == 'iw':
|
| 141 |
text_eng=GoogleTranslator(source='iw', target='en').translate(text)
|