Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
class AbbyyVantage:
|
| 2 |
"""
|
| 3 |
A client to interact with the ABBYY Vantage public API.
|
|
|
|
| 1 |
+
# Standard Library Imports
|
| 2 |
+
import os
|
| 3 |
+
import uuid
|
| 4 |
+
import time
|
| 5 |
+
|
| 6 |
+
# Third-Party Libraries
|
| 7 |
+
import requests
|
| 8 |
+
import pandas as pd
|
| 9 |
+
from dotenv import load_dotenv
|
| 10 |
+
from tenacity import retry, stop_after_delay, wait_fixed, RetryError
|
| 11 |
+
import gradio as gr
|
| 12 |
+
|
| 13 |
+
# LangChain Imports
|
| 14 |
+
from langchain.chat_models import ChatOpenAI
|
| 15 |
+
from langchain.chains import ConversationalRetrievalChain
|
| 16 |
+
from langchain.embeddings import OpenAIEmbeddings
|
| 17 |
+
from langchain.vectorstores import Chroma
|
| 18 |
+
from langchain.text_splitter import SpacyTextSplitter
|
| 19 |
+
from langchain.document_loaders import TextLoader
|
| 20 |
+
from langchain.memory import ConversationBufferMemory
|
| 21 |
+
from langchain.agents import initialize_agent, Tool
|
| 22 |
+
from langchain.agents.agent_types import AgentType
|
| 23 |
+
|
| 24 |
class AbbyyVantage:
|
| 25 |
"""
|
| 26 |
A client to interact with the ABBYY Vantage public API.
|