ErikH commited on
Commit
8809b14
·
1 Parent(s): 989cff4

Update pages/bot.py

Browse files
Files changed (1) hide show
  1. pages/bot.py +6 -1
pages/bot.py CHANGED
@@ -37,7 +37,12 @@ def get_pdf_text(folder_path):
37
  for page in pdf_reader.pages:
38
  text += page.extract_text()
39
  #text += '\n'
40
-
 
 
 
 
 
41
  return text
42
 
43
  #Chunks erstellen
 
37
  for page in pdf_reader.pages:
38
  text += page.extract_text()
39
  #text += '\n'
40
+ translator = pipeline("translation_ger_to_en", model="t5-small")
41
+ text=text.replace("\n", " ")
42
+ text=text.replace("- ", "")
43
+ st.text(text)
44
+ translator(text)
45
+ st.text(text)
46
  return text
47
 
48
  #Chunks erstellen