Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ import os
|
|
25 |
#os.system('gunzip ben.traineddata.gz ')
|
26 |
#os.system('sudo mv -v ben.traineddata /usr/local/share/tessdata/')
|
27 |
#os.system('pip install -q pytesseract')
|
28 |
-
os.system('conda install -c conda-forge poppler')
|
29 |
import streamlit as st
|
30 |
import torch
|
31 |
from transformers import AutoTokenizer, AutoModelWithLMHead, GPT2LMHeadModel
|
@@ -123,7 +123,7 @@ def main():
|
|
123 |
if "photo" not in st.session_state:
|
124 |
st.session_state["photo"]="not done"
|
125 |
if st.session_state["photo"]=="done" or message:
|
126 |
-
|
127 |
if uploaded_photo.type=='application/pdf':
|
128 |
#file = uploaded_photo.read() # Read the data
|
129 |
#image_result = open(uploaded_photo.name, 'wb') # creates a writable image and later we can write the decoded result
|
|
|
25 |
#os.system('gunzip ben.traineddata.gz ')
|
26 |
#os.system('sudo mv -v ben.traineddata /usr/local/share/tessdata/')
|
27 |
#os.system('pip install -q pytesseract')
|
28 |
+
#os.system('conda install -c conda-forge poppler')
|
29 |
import streamlit as st
|
30 |
import torch
|
31 |
from transformers import AutoTokenizer, AutoModelWithLMHead, GPT2LMHeadModel
|
|
|
123 |
if "photo" not in st.session_state:
|
124 |
st.session_state["photo"]="not done"
|
125 |
if st.session_state["photo"]=="done" or message:
|
126 |
+
text=" "
|
127 |
if uploaded_photo.type=='application/pdf':
|
128 |
#file = uploaded_photo.read() # Read the data
|
129 |
#image_result = open(uploaded_photo.name, 'wb') # creates a writable image and later we can write the decoded result
|