Soumen commited on
Commit
68f40bc
1 Parent(s): 3d7adba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -1,10 +1,8 @@
1
  """
2
  #App: NLP App with Streamlit
3
  Description
4
- This is a Natural Language Processing(NLP) base Application that is useful for basic NLP tasks such as follows;
5
-
6
- + Document/Text Summarization from Bangla and English Images and PDF files.
7
-
8
  """
9
  # Core Pkgs
10
  import os
@@ -27,12 +25,6 @@ from pdf2image import convert_from_bytes
27
  import pdfplumber
28
  #from line_cor import mark_region
29
  import pdf2image
30
-
31
-
32
- # # NLP Pkgs
33
- # from textblob import TextBlob
34
- # import spacy
35
- # #from gensim.summarization import summarize
36
  import requests
37
  import cv2
38
  import numpy as np
@@ -46,9 +38,6 @@ headers = {"Authorization": "Bearer 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"}
46
  API_URL0 = "https://api-inference.huggingface.co/models/csebuetnlp/mT5_multilingual_XLSum"
47
  headers0 = {"Authorization": "Bearer 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"}
48
 
49
- def query(payload):
50
- response = requests.post(API_URL, headers=headers, json=payload)
51
- return response.json()
52
 
53
  def read_pdf(file):
54
  # images=pdf2image.convert_from_path(file)
 
1
  """
2
  #App: NLP App with Streamlit
3
  Description
4
+ This is a Natural Language Processing(NLP) base Application that is useful for
5
+ Document/Text Summarization from Bangla and English Images and PDF files.
 
 
6
  """
7
  # Core Pkgs
8
  import os
 
25
  import pdfplumber
26
  #from line_cor import mark_region
27
  import pdf2image
 
 
 
 
 
 
28
  import requests
29
  import cv2
30
  import numpy as np
 
38
  API_URL0 = "https://api-inference.huggingface.co/models/csebuetnlp/mT5_multilingual_XLSum"
39
  headers0 = {"Authorization": "Bearer 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"}
40
 
 
 
 
41
 
42
  def read_pdf(file):
43
  # images=pdf2image.convert_from_path(file)