Spaces:
Sleeping
Sleeping
Add application file
Browse files
app.py
CHANGED
@@ -2,12 +2,16 @@ import gradio as gr
|
|
2 |
import os
|
3 |
import requests
|
4 |
from PIL import Image
|
|
|
5 |
import torch
|
6 |
from transformers import BlipProcessor, BlipForConditionalGeneration
|
|
|
|
|
7 |
from langchain.chat_models import ChatOpenAI
|
8 |
from langchain.chat_models import AzureChatOpenAI
|
9 |
from langchain.prompts import PromptTemplate
|
10 |
from langchain.chains import LLMChain
|
|
|
11 |
from transformers import BlipProcessor, BlipForConditionalGeneration
|
12 |
|
13 |
|
|
|
2 |
import os
|
3 |
import requests
|
4 |
from PIL import Image
|
5 |
+
from langchain.tools import BaseTool
|
6 |
import torch
|
7 |
from transformers import BlipProcessor, BlipForConditionalGeneration
|
8 |
+
from langchain.agents import load_tools
|
9 |
+
from langchain.agents import initialize_agent
|
10 |
from langchain.chat_models import ChatOpenAI
|
11 |
from langchain.chat_models import AzureChatOpenAI
|
12 |
from langchain.prompts import PromptTemplate
|
13 |
from langchain.chains import LLMChain
|
14 |
+
from langchain.chains.conversation.memory import ConversationBufferWindowMemory
|
15 |
from transformers import BlipProcessor, BlipForConditionalGeneration
|
16 |
|
17 |
|