merterbak commited on
Commit
dfd8ede
·
verified ·
1 Parent(s): 5fb71ab

Changed ocr model to new model mistral-ocr-2505

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ def upload_pdf(content, filename, api_key):
21
  def process_ocr(document_source, api_key):
22
  client = Mistral(api_key=api_key)
23
  return client.ocr.process(
24
- model="mistral-ocr-latest",
25
  document=document_source,
26
  include_image_base64=True
27
  )
@@ -124,7 +124,7 @@ with gr.Blocks(
124
  theme=gr.themes.Soft()
125
  ) as demo:
126
  gr.Markdown("<h1 style='text-align: center;'>Mistral OCR Demo</h1>")
127
- gr.Markdown("<p style='text-align: center;'>Extract text and images from PDFs or images using Mistral's latest OCR model. You can also see markdown live.</p>")
128
  gr.Markdown("<p style='text-align: center;'>Provide your Mistral API key below or set the `MISTRAL` environment variable. Visit <a href='https://console.mistral.ai/'>Mistral AI Console</a> to manage your API key.</p>")
129
 
130
  with gr.Row():
 
21
  def process_ocr(document_source, api_key):
22
  client = Mistral(api_key=api_key)
23
  return client.ocr.process(
24
+ model="mistral-ocr-2505",
25
  document=document_source,
26
  include_image_base64=True
27
  )
 
124
  theme=gr.themes.Soft()
125
  ) as demo:
126
  gr.Markdown("<h1 style='text-align: center;'>Mistral OCR Demo</h1>")
127
+ gr.Markdown("<p style='text-align: center;'>Extract text and images from PDFs or images using Mistral's latest OCR model mistral-ocr-2505. You can also see markdown live.</p>")
128
  gr.Markdown("<p style='text-align: center;'>Provide your Mistral API key below or set the `MISTRAL` environment variable. Visit <a href='https://console.mistral.ai/'>Mistral AI Console</a> to manage your API key.</p>")
129
 
130
  with gr.Row():