added some llms
Browse files- app.py +14 -3
- requirements.txt +8 -1
app.py
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
from streamlit_pdf_viewer import pdf_viewer
|
4 |
|
5 |
st.set_page_config(layout="wide")
|
@@ -20,12 +25,18 @@ with st.sidebar:
|
|
20 |
# Select Provider
|
21 |
provider = st.selectbox(
|
22 |
label="Select LLM Provider",
|
23 |
-
options=['
|
24 |
index=0
|
25 |
)
|
26 |
|
27 |
# Select LLM
|
28 |
-
if provider == '
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
llm_list = ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-turbo', 'gpt-4o']
|
30 |
else:
|
31 |
llm_list = []
|
@@ -64,7 +75,7 @@ with st.sidebar:
|
|
64 |
col1, col2 = st.columns(2)
|
65 |
|
66 |
with col1:
|
67 |
-
|
68 |
|
69 |
with col2:
|
70 |
if uploaded_file is not None:
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
from llama_index.llms.gemini import Gemini
|
4 |
+
from llama_index.llms.huggingface import HuggingFaceLLM
|
5 |
+
from llama_index.llms.mistralai import MistralAI
|
6 |
+
from llama_index.llms.openai import OpenAI
|
7 |
+
|
8 |
from streamlit_pdf_viewer import pdf_viewer
|
9 |
|
10 |
st.set_page_config(layout="wide")
|
|
|
25 |
# Select Provider
|
26 |
provider = st.selectbox(
|
27 |
label="Select LLM Provider",
|
28 |
+
options=['gemini', 'huggingface', 'mistralai', 'openai'],
|
29 |
index=0
|
30 |
)
|
31 |
|
32 |
# Select LLM
|
33 |
+
if provider == 'gemini':
|
34 |
+
llm_list = []
|
35 |
+
elif provider == 'huggingface':
|
36 |
+
llm_list = []
|
37 |
+
elif provider == 'mistralai':
|
38 |
+
llm_list =[]
|
39 |
+
elif provider == 'openai':
|
40 |
llm_list = ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-turbo', 'gpt-4o']
|
41 |
else:
|
42 |
llm_list = []
|
|
|
75 |
col1, col2 = st.columns(2)
|
76 |
|
77 |
with col1:
|
78 |
+
pass
|
79 |
|
80 |
with col2:
|
81 |
if uploaded_file is not None:
|
requirements.txt
CHANGED
@@ -1 +1,8 @@
|
|
1 |
-
streamlit-pdf-viewer==0.0.13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
streamlit-pdf-viewer==0.0.13
|
2 |
+
llama-index
|
3 |
+
google-generativeai
|
4 |
+
llama-index-llms-gemini
|
5 |
+
llama-index-llms-huggingface
|
6 |
+
llama-index-llms-huggingface-api
|
7 |
+
llama-index-llms-mistralai
|
8 |
+
llama-index-llms-openai
|