Spaces:
Sleeping
Sleeping
robertselvam
commited on
Commit
•
e317e6a
1
Parent(s):
bbe15ac
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
class ChatDocumentQA:
|
2 |
def __init__(self) -> None:
|
3 |
pass
|
|
|
1 |
+
from langchain.text_splitter import CharacterTextSplitter
|
2 |
+
from langchain.embeddings import OpenAIEmbeddings
|
3 |
+
from langchain.vectorstores import FAISS
|
4 |
+
from langchain.chat_models import ChatOpenAI
|
5 |
+
from langchain.memory import ConversationBufferMemory
|
6 |
+
from langchain.chains import ConversationChain
|
7 |
+
from langchain.chains import ConversationalRetrievalChain
|
8 |
+
from langchain.document_loaders import UnstructuredFileLoader
|
9 |
+
from typing import List, Dict, Tuple
|
10 |
+
import gradio as gr
|
11 |
+
import validators
|
12 |
+
import requests
|
13 |
+
import mimetypes
|
14 |
+
import tempfile
|
15 |
+
import os
|
16 |
+
from langchain.chains.question_answering import load_qa_chain
|
17 |
+
from langchain.llms import OpenAI
|
18 |
+
from langchain.prompts import PromptTemplate
|
19 |
+
from langchain.prompts.prompt import PromptTemplate
|
20 |
+
import pandas as pd
|
21 |
+
from langchain.agents import create_pandas_dataframe_agent
|
22 |
+
from langchain.agents import ZeroShotAgent, Tool, AgentExecutor
|
23 |
+
from langchain import OpenAI, LLMChain
|
24 |
class ChatDocumentQA:
|
25 |
def __init__(self) -> None:
|
26 |
pass
|