Spaces:
Sleeping
Sleeping
Commit
·
068f115
1
Parent(s):
eb39769
Update llama lib
Browse files
app.py
CHANGED
@@ -1,17 +1,16 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
-
from llama_index import VectorStoreIndex, SimpleDirectoryReader, SummaryIndex
|
4 |
from llama_index.readers import SimpleWebPageReader
|
5 |
from llama_index.llms import MistralAI
|
6 |
from llama_index.embeddings import MistralAIEmbedding
|
7 |
-
from llama_index import ServiceContext
|
8 |
from llama_index.query_engine import RetrieverQueryEngine
|
9 |
|
10 |
-
title = "Gaia Mistral Chat RAG URL Demo"
|
11 |
description = "Example of an assistant with Gradio, RAG from url and Mistral AI via its API"
|
12 |
placeholder = "Vous pouvez me posez une question sur ce contexte, appuyer sur Entrée pour valider"
|
13 |
placeholder_url = "Extract text from this url"
|
14 |
-
llm_model = '
|
15 |
# choose api_key from .env or from input field
|
16 |
# placeholder_api_key = "API key"
|
17 |
env_api_key = os.environ.get("MISTRAL_API_KEY")
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
+
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, SummaryIndex, ServiceContext
|
4 |
from llama_index.readers import SimpleWebPageReader
|
5 |
from llama_index.llms import MistralAI
|
6 |
from llama_index.embeddings import MistralAIEmbedding
|
|
|
7 |
from llama_index.query_engine import RetrieverQueryEngine
|
8 |
|
9 |
+
title = "Gaia Mistral 8x7b Chat RAG URL Demo"
|
10 |
description = "Example of an assistant with Gradio, RAG from url and Mistral AI via its API"
|
11 |
placeholder = "Vous pouvez me posez une question sur ce contexte, appuyer sur Entrée pour valider"
|
12 |
placeholder_url = "Extract text from this url"
|
13 |
+
llm_model = 'open-mixtral-8x7b'
|
14 |
# choose api_key from .env or from input field
|
15 |
# placeholder_api_key = "API key"
|
16 |
env_api_key = os.environ.get("MISTRAL_API_KEY")
|