Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,9 +19,7 @@ sys.path.append('../..')
|
|
19 |
#langchain
|
20 |
from langchain.text_splitter import RecursiveCharacterTextSplitter, CharacterTextSplitter
|
21 |
from langchain.embeddings import HuggingFaceEmbeddings
|
22 |
-
from langchain.prompts import PromptTemplate
|
23 |
from langchain.chains import RetrievalQA
|
24 |
-
from langchain.prompts import ChatPromptTemplate
|
25 |
from langchain.schema import StrOutputParser
|
26 |
from langchain.schema.runnable import Runnable
|
27 |
from langchain.schema.runnable.config import RunnableConfig
|
@@ -30,9 +28,8 @@ from langchain.chains import (
|
|
30 |
from langchain.vectorstores import Chroma
|
31 |
from langchain.memory import ConversationBufferMemory
|
32 |
from langchain.chains import LLMChain
|
33 |
-
from langchain.prompts.prompt import PromptTemplate
|
34 |
from langchain.prompts.chat import ChatPromptTemplate, SystemMessagePromptTemplate
|
35 |
-
from langchain.prompts import SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate
|
36 |
from langchain.document_loaders import PyPDFDirectoryLoader
|
37 |
from pydantic import BaseModel, Field
|
38 |
from langchain.output_parsers import PydanticOutputParser
|
@@ -185,7 +182,7 @@ banner_tab_content = """
|
|
185 |
"""
|
186 |
banner_tab = gr.Markdown(banner_tab_content)
|
187 |
|
188 |
-
# Combine
|
189 |
app = gr.TabbedInterface(
|
190 |
[banner_tab, image_gradio_app, chatbot_gradio_app],
|
191 |
tab_names=["Welcome to Green Greta", "Green Greta Image Classification", "Green Greta Chat"],
|
|
|
19 |
#langchain
|
20 |
from langchain.text_splitter import RecursiveCharacterTextSplitter, CharacterTextSplitter
|
21 |
from langchain.embeddings import HuggingFaceEmbeddings
|
|
|
22 |
from langchain.chains import RetrievalQA
|
|
|
23 |
from langchain.schema import StrOutputParser
|
24 |
from langchain.schema.runnable import Runnable
|
25 |
from langchain.schema.runnable.config import RunnableConfig
|
|
|
28 |
from langchain.vectorstores import Chroma
|
29 |
from langchain.memory import ConversationBufferMemory
|
30 |
from langchain.chains import LLMChain
|
|
|
31 |
from langchain.prompts.chat import ChatPromptTemplate, SystemMessagePromptTemplate
|
32 |
+
from langchain.prompts import SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate
|
33 |
from langchain.document_loaders import PyPDFDirectoryLoader
|
34 |
from pydantic import BaseModel, Field
|
35 |
from langchain.output_parsers import PydanticOutputParser
|
|
|
182 |
"""
|
183 |
banner_tab = gr.Markdown(banner_tab_content)
|
184 |
|
185 |
+
# Combine interfaces into a single app
|
186 |
app = gr.TabbedInterface(
|
187 |
[banner_tab, image_gradio_app, chatbot_gradio_app],
|
188 |
tab_names=["Welcome to Green Greta", "Green Greta Image Classification", "Green Greta Chat"],
|