Spaces:
Paused
Paused
Shreyas094
commited on
Commit
•
9e38742
1
Parent(s):
63b644a
Update app.py
Browse files
app.py
CHANGED
@@ -7,15 +7,10 @@ import requests
|
|
7 |
import random
|
8 |
import urllib.parse
|
9 |
import spacy
|
10 |
-
import nltk
|
11 |
-
from nltk.tokenize import word_tokenize, sent_tokenize
|
12 |
-
from sklearn.feature_extraction.text import TfidfVectorizer
|
13 |
from sklearn.metrics.pairwise import cosine_similarity
|
14 |
import numpy as np
|
15 |
-
from nltk.tokenize import sent_tokenize
|
16 |
from typing import List, Dict
|
17 |
from tempfile import NamedTemporaryFile
|
18 |
-
from typing import List, Dict
|
19 |
from bs4 import BeautifulSoup
|
20 |
from langchain.prompts import PromptTemplate
|
21 |
from langchain.chains import LLMChain
|
@@ -26,6 +21,7 @@ from langchain_core.output_parsers import StrOutputParser
|
|
26 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
27 |
from langchain_community.llms import HuggingFaceHub
|
28 |
from langchain_core.documents import Document
|
|
|
29 |
|
30 |
huggingface_token = os.environ.get("HUGGINGFACE_TOKEN")
|
31 |
|
|
|
7 |
import random
|
8 |
import urllib.parse
|
9 |
import spacy
|
|
|
|
|
|
|
10 |
from sklearn.metrics.pairwise import cosine_similarity
|
11 |
import numpy as np
|
|
|
12 |
from typing import List, Dict
|
13 |
from tempfile import NamedTemporaryFile
|
|
|
14 |
from bs4 import BeautifulSoup
|
15 |
from langchain.prompts import PromptTemplate
|
16 |
from langchain.chains import LLMChain
|
|
|
21 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
22 |
from langchain_community.llms import HuggingFaceHub
|
23 |
from langchain_core.documents import Document
|
24 |
+
from sentence_transformers import SentenceTransformer
|
25 |
|
26 |
huggingface_token = os.environ.get("HUGGINGFACE_TOKEN")
|
27 |
|