mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-07 15:53:45 +08:00
update
This commit is contained in:
parent
f1ccaffafe
commit
0b2c03b6e9
2
.gitignore
vendored
2
.gitignore
vendored
@ -207,3 +207,5 @@ data/*
|
|||||||
**/llmops/outputs/*
|
**/llmops/outputs/*
|
||||||
**/*.zip
|
**/*.zip
|
||||||
**/llm-examples/*
|
**/llm-examples/*
|
||||||
|
**/*.ipynb_checkpoints
|
||||||
|
**/*.ipynb
|
||||||
@ -12,6 +12,7 @@ build_dependencies:
|
|||||||
- langchain_google_genai
|
- langchain_google_genai
|
||||||
- langchain-deepseek
|
- langchain-deepseek
|
||||||
- langchain-community
|
- langchain-community
|
||||||
|
- mlflow[genai]
|
||||||
# Dependencies required to run the project.
|
# Dependencies required to run the project.
|
||||||
dependencies:
|
dependencies:
|
||||||
- mlflow==2.8.1
|
- mlflow==2.8.1
|
||||||
@ -11,9 +11,6 @@ from langchain_community.llms.moonshot import Moonshot
|
|||||||
import torch
|
import torch
|
||||||
torch.classes.__path__ = [os.path.join(torch.__path__[0], torch.classes.__file__)]
|
torch.classes.__path__ = [os.path.join(torch.__path__[0], torch.classes.__file__)]
|
||||||
|
|
||||||
# # # or simply:
|
|
||||||
# torch.classes.__path__ = []
|
|
||||||
|
|
||||||
|
|
||||||
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
||||||
GEMINI_API_KEY = config("GOOGLE_API_KEY", cast=str, default="123456")
|
GEMINI_API_KEY = config("GOOGLE_API_KEY", cast=str, default="123456")
|
||||||
@ -31,15 +28,12 @@ if "messages" not in st.session_state:
|
|||||||
for msg in st.session_state.messages:
|
for msg in st.session_state.messages:
|
||||||
st.chat_message(msg["role"]).write(msg["content"])
|
st.chat_message(msg["role"]).write(msg["content"])
|
||||||
|
|
||||||
print('i am here1')
|
|
||||||
# Load data from ChromaDB
|
# Load data from ChromaDB
|
||||||
chroma_client = chromadb.PersistentClient(path=INPUT_CHROMADB_LOCAL)
|
chroma_client = chromadb.PersistentClient(path=INPUT_CHROMADB_LOCAL)
|
||||||
collection = chroma_client.get_collection(name=COLLECTION_NAME)
|
collection = chroma_client.get_collection(name=COLLECTION_NAME)
|
||||||
print('i am here2')
|
|
||||||
|
|
||||||
# Initialize embedding model
|
# Initialize embedding model
|
||||||
model = SentenceTransformer(EMBEDDING_MODEL)
|
model = SentenceTransformer(EMBEDDING_MODEL)
|
||||||
print('i am here3')
|
|
||||||
|
|
||||||
if CHAT_MODEL_PROVIDER == "deepseek":
|
if CHAT_MODEL_PROVIDER == "deepseek":
|
||||||
# Initialize DeepSeek model
|
# Initialize DeepSeek model
|
||||||
@ -88,7 +82,6 @@ Provide the answer with language that is similar to the question asked.
|
|||||||
"""
|
"""
|
||||||
answer_prompt = PromptTemplate(template=answer_template, input_variables=["cot", "question"])
|
answer_prompt = PromptTemplate(template=answer_template, input_variables=["cot", "question"])
|
||||||
answer_chain = answer_prompt | llm
|
answer_chain = answer_prompt | llm
|
||||||
print('i am here4')
|
|
||||||
|
|
||||||
if prompt := st.chat_input():
|
if prompt := st.chat_input():
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,8 @@ WORKDIR /app/streamlit
|
|||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
# RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
COPY Chatbot.py .
|
COPY Chatbot.py .
|
||||||
COPY .env .
|
COPY .env .
|
||||||
@ -13,6 +14,8 @@ COPY .env .
|
|||||||
COPY initialize_sentence_transformer.py .
|
COPY initialize_sentence_transformer.py .
|
||||||
RUN python initialize_sentence_transformer.py
|
RUN python initialize_sentence_transformer.py
|
||||||
|
|
||||||
|
COPY pages ./pages
|
||||||
|
|
||||||
EXPOSE 8501
|
EXPOSE 8501
|
||||||
|
|
||||||
ENTRYPOINT ["streamlit", "run", "Chatbot.py"]
|
ENTRYPOINT ["streamlit", "run", "Chatbot.py"]
|
||||||
@ -1,14 +1,14 @@
|
|||||||
streamlit>=1.28
|
streamlit==1.28.0
|
||||||
langchain>=0.0.217
|
langchain
|
||||||
openai>=1.2
|
openai==1.65.4
|
||||||
duckduckgo-search
|
duckduckgo_search==7.5.0
|
||||||
anthropic>=0.3.0
|
anthropic==0.49.0
|
||||||
trubrics>=1.4.3
|
trubrics==1.8.3
|
||||||
streamlit-feedback
|
streamlit-feedback==0.1.4
|
||||||
langchain-community
|
langchain-community==0.3.19
|
||||||
chromadb
|
chromadb==0.6.3
|
||||||
python-decouple
|
python-decouple==3.8
|
||||||
langchain_google_genai
|
langchain-google-genai==2.0.10
|
||||||
langchain-deepseek
|
langchain-deepseek==0.1.2
|
||||||
sentence_transformers
|
sentence-transformers==3.4.1
|
||||||
watchdog
|
watchdog==6.0.0
|
||||||
Loading…
x
Reference in New Issue
Block a user