Spaces:
Sleeping
Sleeping
ionosphere
commited on
Commit
·
3ac4842
1
Parent(s):
ab87acb
Update stack
Browse files- README.md +1 -1
- app.py +10 -9
- requirements.txt +10 -5
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 👁
|
|
4 |
colorFrom: red
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: red
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.29.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
app.py
CHANGED
@@ -1,25 +1,26 @@
|
|
1 |
import os
|
2 |
import json
|
3 |
import gradio as gr
|
4 |
-
|
|
|
|
|
5 |
VectorStoreIndex,
|
|
|
|
|
6 |
download_loader,
|
7 |
)
|
8 |
-
import chromadb
|
9 |
|
10 |
-
from llama_index.llms import MistralAI
|
11 |
-
from llama_index.embeddings import MistralAIEmbedding
|
12 |
-
from llama_index.vector_stores import ChromaVectorStore
|
13 |
-
from llama_index.storage.storage_context import StorageContext
|
14 |
-
from llama_index import ServiceContext
|
15 |
|
16 |
-
title = "Gaia Mistral Chat RAG PDF Demo"
|
17 |
description = "Example of an assistant with Gradio, RAG from PDF documents and Mistral AI via its API"
|
18 |
placeholder = (
|
19 |
"Vous pouvez me posez une question sur ce contexte, appuyer sur Entrée pour valider"
|
20 |
)
|
21 |
placeholder_url = "Extract text from this url"
|
22 |
-
llm_model = "
|
23 |
|
24 |
env_api_key = os.environ.get("MISTRAL_API_KEY")
|
25 |
query_engine = None
|
|
|
1 |
import os
|
2 |
import json
|
3 |
import gradio as gr
|
4 |
+
import chromadb
|
5 |
+
|
6 |
+
from llama_index.core import (
|
7 |
VectorStoreIndex,
|
8 |
+
StorageContext,
|
9 |
+
ServiceContext,
|
10 |
download_loader,
|
11 |
)
|
|
|
12 |
|
13 |
+
from llama_index.llms.mistralai import MistralAI
|
14 |
+
from llama_index.embeddings.mistralai import MistralAIEmbedding
|
15 |
+
from llama_index.vector_stores.chroma import ChromaVectorStore
|
|
|
|
|
16 |
|
17 |
+
title = "Gaia Mistral 8x7b Chat RAG PDF Demo"
|
18 |
description = "Example of an assistant with Gradio, RAG from PDF documents and Mistral AI via its API"
|
19 |
placeholder = (
|
20 |
"Vous pouvez me posez une question sur ce contexte, appuyer sur Entrée pour valider"
|
21 |
)
|
22 |
placeholder_url = "Extract text from this url"
|
23 |
+
llm_model = "open-mixtral-8x7b"
|
24 |
|
25 |
env_api_key = os.environ.get("MISTRAL_API_KEY")
|
26 |
query_engine = None
|
requirements.txt
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
-
pypdf
|
2 |
-
mistralai
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
pypdf
|
2 |
+
mistralai
|
3 |
+
gradio
|
4 |
+
chromadb
|
5 |
+
llama-index
|
6 |
+
llama-index-readers-web
|
7 |
+
llama-index-readers-file
|
8 |
+
llama-index-llms-mistralai
|
9 |
+
llama-index-embeddings-mistralai
|
10 |
+
llama-index-vector-stores-chroma
|