danielsuarez-mash
commited on
Commit
•
7ff25d4
1
Parent(s):
8d254df
Updated
Browse files
app.py
CHANGED
@@ -13,10 +13,12 @@ from langchain_core.output_parsers import StrOutputParser
|
|
13 |
st.title('LLM - Retrieval Augmented Generation')
|
14 |
|
15 |
model_names = ['tiiuae/falcon-7b-instruct',
|
16 |
-
'google/gemma-2-2b'
|
|
|
17 |
|
18 |
api_urls = ['https://api-inference.huggingface.co/models/tiiuae/falcon-7b-instruct',
|
19 |
-
'https://api-inference.huggingface.co/models/google/gemma-2-2b'
|
|
|
20 |
|
21 |
model_dict = dict(zip(model_names, api_urls))
|
22 |
|
@@ -137,7 +139,7 @@ def instantiate_llm(model, temperature):
|
|
137 |
)
|
138 |
|
139 |
llm.client.api_url = model_dict[str(model)]
|
140 |
-
|
141 |
return llm
|
142 |
|
143 |
@st.cache_resource
|
@@ -201,5 +203,3 @@ def main():
|
|
201 |
|
202 |
if __name__=='__main__':
|
203 |
main()
|
204 |
-
|
205 |
-
|
|
|
13 |
st.title('LLM - Retrieval Augmented Generation')
|
14 |
|
15 |
model_names = ['tiiuae/falcon-7b-instruct',
|
16 |
+
'google/gemma-2-2b',
|
17 |
+
'mistralai/Mistral-7B-v0.1']
|
18 |
|
19 |
api_urls = ['https://api-inference.huggingface.co/models/tiiuae/falcon-7b-instruct',
|
20 |
+
'https://api-inference.huggingface.co/models/google/gemma-2-2b',
|
21 |
+
"https://api-inference.huggingface.co/models/mistralai/Mistral-7B-v0.1"]
|
22 |
|
23 |
model_dict = dict(zip(model_names, api_urls))
|
24 |
|
|
|
139 |
)
|
140 |
|
141 |
llm.client.api_url = model_dict[str(model)]
|
142 |
+
|
143 |
return llm
|
144 |
|
145 |
@st.cache_resource
|
|
|
203 |
|
204 |
if __name__=='__main__':
|
205 |
main()
|
|
|
|