mkaramb commited on
Commit
a22bf0a
·
verified ·
1 Parent(s): 5481180

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -3,15 +3,11 @@ from google.api_core.client_options import ClientOptions
3
  from google.cloud import documentai_v1 as documentai
4
  from google.cloud.documentai_v1.types import RawDocument
5
  from google.cloud import translate_v2 as translate
6
- from google.colab import files
7
  import zipfile
8
  import os
9
  import io
10
  import gradio as gr
11
 
12
- # Upload credential json file from default compute service account
13
- os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "herbaria-ai-3c860bcb0f44.json"
14
-
15
  # Global DataFrame declaration
16
  results_df = pd.DataFrame(columns=["Filename", "Extracted Text", "Translated Text"])
17
 
@@ -80,7 +76,6 @@ def process_images(uploaded_file):
80
 
81
  return results_df.to_html()
82
 
83
-
84
  interface = gr.Interface(
85
  fn=process_images,
86
  inputs="file",
@@ -94,6 +89,7 @@ if __name__ == "__main__":
94
 
95
 
96
 
 
97
  # def greet(name):
98
  # return "Hello " + name + "!!"
99
 
 
3
  from google.cloud import documentai_v1 as documentai
4
  from google.cloud.documentai_v1.types import RawDocument
5
  from google.cloud import translate_v2 as translate
 
6
  import zipfile
7
  import os
8
  import io
9
  import gradio as gr
10
 
 
 
 
11
  # Global DataFrame declaration
12
  results_df = pd.DataFrame(columns=["Filename", "Extracted Text", "Translated Text"])
13
 
 
76
 
77
  return results_df.to_html()
78
 
 
79
  interface = gr.Interface(
80
  fn=process_images,
81
  inputs="file",
 
89
 
90
 
91
 
92
+
93
  # def greet(name):
94
  # return "Hello " + name + "!!"
95