import logging import os import gradio as gr import streamlit as st import onnxruntime as ort import pke import nltk nltk.download('stopwords') nltk.download('wordnet') nltk.download('punkt') from nltk.corpus import stopwords,wordnet from nltk.tokenize import sent_tokenize from flashtext import KeywordProcessor import regex as re import string import subprocess from PIL import Image import multiprocessing total_threads=multiprocessing.cpu_count() subprocess.run(['pip3', 'install','git+https://github.com/boudinfl/pke.git']) st.set_page_config( # Alternate names: setup_page, page, layout layout="wide", # Can be "centered" or "wide". In the future also "dashboard", etc. initial_sidebar_state="auto", # Can be "auto", "expanded", "collapsed" page_title='None', # String or None. Strings get appended with "• Streamlit". ) def set_page_title(title): st.sidebar.markdown(unsafe_allow_html=True, body=f"""