orrinin commited on
Commit
4a6c082
·
verified ·
1 Parent(s): cd37197

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,14 +13,14 @@ mistral_api_key = os.environ.get("API_KEY")
13
 
14
  cli = MistralAsyncClient(api_key = mistral_api_key)
15
 
16
- def get_text_embedding(input: str):
17
  embeddings_batch_response = cli.embeddings(
18
  model = "mistral-embed",
19
  input = input
20
  )
21
  return embeddings_batch_response.data[0].embedding
22
 
23
- def rag_pdf(pdfs: list, question: str) -> str:
24
  chunk_size = 4096
25
  chunks = []
26
  for pdf in pdfs:
 
13
 
14
  cli = MistralAsyncClient(api_key = mistral_api_key)
15
 
16
+ async def get_text_embedding(input: str):
17
  embeddings_batch_response = cli.embeddings(
18
  model = "mistral-embed",
19
  input = input
20
  )
21
  return embeddings_batch_response.data[0].embedding
22
 
23
+ async def rag_pdf(pdfs: list, question: str) -> str:
24
  chunk_size = 4096
25
  chunks = []
26
  for pdf in pdfs: