prashant
commited on
Commit
·
b114d3b
1
Parent(s):
9dca2b8
chnaging logo file
Browse files- appStore/multiapp.py +1 -1
- docStore/img/sdsn.png +0 -0
- utils/keyword_extraction.py +1 -7
- utils/lexical_search.py +0 -1
appStore/multiapp.py
CHANGED
@@ -45,7 +45,7 @@ class MultiApp:
|
|
45 |
def run(self):
|
46 |
|
47 |
st.sidebar.write(format_func=lambda app: app['title'])
|
48 |
-
image = Image.open('docStore/img/
|
49 |
st.sidebar.image(image, width =200)
|
50 |
|
51 |
with st.sidebar:
|
|
|
45 |
def run(self):
|
46 |
|
47 |
st.sidebar.write(format_func=lambda app: app['title'])
|
48 |
+
image = Image.open('docStore/img/sdsn.jpg')
|
49 |
st.sidebar.image(image, width =200)
|
50 |
|
51 |
with st.sidebar:
|
docStore/img/sdsn.png
ADDED
utils/keyword_extraction.py
CHANGED
@@ -49,8 +49,7 @@ def extract_topn_from_vector(feature_names, sorted_items, top_n=10):
|
|
49 |
#keep track of feature name and its corresponding score
|
50 |
score_vals.append(round(score, 3))
|
51 |
feature_vals.append(feature_names[idx])
|
52 |
-
|
53 |
-
#results = zip(feature_vals,score_vals)
|
54 |
results= {}
|
55 |
for idx in range(len(feature_vals)):
|
56 |
results[feature_vals[idx]]=score_vals[idx]
|
@@ -128,11 +127,6 @@ def textrank(textdata:Text, ratio:float = 0.1, words:int = 0)->List[str]:
|
|
128 |
results: extracted keywords
|
129 |
"""
|
130 |
if words == 0:
|
131 |
-
# try:
|
132 |
-
# words = int(config.get('sdg','TOP_KEY'))
|
133 |
-
# results = keywords.keywords(textdata, words = words).split("\n")
|
134 |
-
# except Exception as e:
|
135 |
-
# logging.warning(e)
|
136 |
logging.info("Textrank using defulat ratio value = 0.1, as no words limit given")
|
137 |
results = keywords.keywords(textdata, ratio= ratio).split("\n")
|
138 |
else:
|
|
|
49 |
#keep track of feature name and its corresponding score
|
50 |
score_vals.append(round(score, 3))
|
51 |
feature_vals.append(feature_names[idx])
|
52 |
+
|
|
|
53 |
results= {}
|
54 |
for idx in range(len(feature_vals)):
|
55 |
results[feature_vals[idx]]=score_vals[idx]
|
|
|
127 |
results: extracted keywords
|
128 |
"""
|
129 |
if words == 0:
|
|
|
|
|
|
|
|
|
|
|
130 |
logging.info("Textrank using defulat ratio value = 0.1, as no words limit given")
|
131 |
results = keywords.keywords(textdata, ratio= ratio).split("\n")
|
132 |
else:
|
utils/lexical_search.py
CHANGED
@@ -3,7 +3,6 @@ from haystack.document_stores import InMemoryDocumentStore
|
|
3 |
import spacy
|
4 |
import re
|
5 |
from spacy.matcher import Matcher
|
6 |
-
import streamlit as st
|
7 |
from markdown import markdown
|
8 |
from annotated_text import annotation
|
9 |
from haystack.schema import Document
|
|
|
3 |
import spacy
|
4 |
import re
|
5 |
from spacy.matcher import Matcher
|
|
|
6 |
from markdown import markdown
|
7 |
from annotated_text import annotation
|
8 |
from haystack.schema import Document
|