Update app.py
Browse files
app.py
CHANGED
@@ -8,13 +8,15 @@ import zipfile
|
|
8 |
import os
|
9 |
import io
|
10 |
|
|
|
|
|
11 |
# Global DataFrame declaration
|
12 |
results_df = pd.DataFrame(columns=["Filename", "Extracted Text", "Translated Text"])
|
13 |
|
14 |
# Set your Google Cloud Document AI processor details here
|
15 |
-
project_id = "
|
16 |
-
location = "
|
17 |
-
processor_id = "
|
18 |
|
19 |
def translate_text(text, target_language="en"):
|
20 |
translate_client = translate.Client()
|
|
|
8 |
import os
|
9 |
import io
|
10 |
|
11 |
+
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "herbaria-ai-3c860bcb0f44.json"
|
12 |
+
|
13 |
# Global DataFrame declaration
|
14 |
results_df = pd.DataFrame(columns=["Filename", "Extracted Text", "Translated Text"])
|
15 |
|
16 |
# Set your Google Cloud Document AI processor details here
|
17 |
+
project_id = "herbaria-ai"
|
18 |
+
location = "us"
|
19 |
+
processor_id = "4307b078717a399a"
|
20 |
|
21 |
def translate_text(text, target_language="en"):
|
22 |
translate_client = translate.Client()
|