Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,22 @@
|
|
1 |
from InnovationHub.llm.vector_store import *
|
2 |
from InnovationHub.llm.chain import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"""
|
4 |
# Create the vector index
|
5 |
db_path = "./data/s-class-manual"
|
6 |
-
# docs = create_docs(input_file=input_file)
|
7 |
embeddings = HuggingfaceEmbeddings()
|
8 |
index = FAISS(docs=docs, folder_path=db_path, embeddings=embeddings)
|
9 |
|
|
|
1 |
from InnovationHub.llm.vector_store import *
|
2 |
from InnovationHub.llm.chain import *
|
3 |
+
import os
|
4 |
+
import pprint
|
5 |
+
import codecs
|
6 |
+
import chardet
|
7 |
+
import gradio as gr
|
8 |
+
from langchain.llms import HuggingFacePipeline
|
9 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
10 |
+
from langchain.embeddings import HuggingFaceEmbeddings
|
11 |
+
from langchain.vectorstores import FAISS
|
12 |
+
from langchain import OpenAI, ConversationChain, LLMChain, PromptTemplate
|
13 |
+
from langchain.chains.conversation.memory import ConversationalBufferWindowMemory
|
14 |
+
from EdgeGPT import Chatbot
|
15 |
+
|
16 |
+
|
17 |
"""
|
18 |
# Create the vector index
|
19 |
db_path = "./data/s-class-manual"
|
|
|
20 |
embeddings = HuggingfaceEmbeddings()
|
21 |
index = FAISS(docs=docs, folder_path=db_path, embeddings=embeddings)
|
22 |
|