KevanSoon
commited on
Commit
·
e4507fd
1
Parent(s):
c83ed30
change back sealion model
Browse files
app.py
CHANGED
|
@@ -949,7 +949,7 @@ async def generate_html_from_hocr(translated_hocr_html: str) -> str:
|
|
| 949 |
raise ValueError("GEMINI_API_KEY not found in environment variables.")
|
| 950 |
|
| 951 |
genai.configure(api_key=api_key)
|
| 952 |
-
model = genai.GenerativeModel(model_name="gemini-
|
| 953 |
|
| 954 |
prompt = f"""
|
| 955 |
Given the following hOCR HTML, which contains translated text and positional information, convert it into a clean, well-styled HTML document suitable for display in an iframe.
|
|
@@ -1400,7 +1400,7 @@ async def translate_texts_with_gemini(texts: list[str], target_language: str) ->
|
|
| 1400 |
raise ValueError("GEMINI_API_KEY not found in environment variables.")
|
| 1401 |
|
| 1402 |
genai.configure(api_key=api_key)
|
| 1403 |
-
model = genai.GenerativeModel(model_name="gemini-
|
| 1404 |
|
| 1405 |
# Create a single prompt asking for a JSON array response
|
| 1406 |
prompt = f"""
|
|
@@ -1572,7 +1572,7 @@ async def generate_html_from_dual_ocr(
|
|
| 1572 |
raise ValueError("GEMINI_API_KEY not found in environment variables.")
|
| 1573 |
|
| 1574 |
genai.configure(api_key=api_key)
|
| 1575 |
-
model = genai.GenerativeModel(model_name="gemini-
|
| 1576 |
|
| 1577 |
prompt = f"""
|
| 1578 |
You are provided with two different translated OCR outputs for the same document.
|
|
|
|
| 949 |
raise ValueError("GEMINI_API_KEY not found in environment variables.")
|
| 950 |
|
| 951 |
genai.configure(api_key=api_key)
|
| 952 |
+
model = genai.GenerativeModel(model_name="gemini-2.5-flash") # Updated model name
|
| 953 |
|
| 954 |
prompt = f"""
|
| 955 |
Given the following hOCR HTML, which contains translated text and positional information, convert it into a clean, well-styled HTML document suitable for display in an iframe.
|
|
|
|
| 1400 |
raise ValueError("GEMINI_API_KEY not found in environment variables.")
|
| 1401 |
|
| 1402 |
genai.configure(api_key=api_key)
|
| 1403 |
+
model = genai.GenerativeModel(model_name="gemini-2.5-flash") # Using Flash for speed
|
| 1404 |
|
| 1405 |
# Create a single prompt asking for a JSON array response
|
| 1406 |
prompt = f"""
|
|
|
|
| 1572 |
raise ValueError("GEMINI_API_KEY not found in environment variables.")
|
| 1573 |
|
| 1574 |
genai.configure(api_key=api_key)
|
| 1575 |
+
model = genai.GenerativeModel(model_name="gemini-2.5-flash") # Using Flash for speed
|
| 1576 |
|
| 1577 |
prompt = f"""
|
| 1578 |
You are provided with two different translated OCR outputs for the same document.
|