Skip to content

Commit 388e6aa

Browse files
committed
chore: update latest gemini model, sort json key
1 parent 27e393d commit 388e6aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
)
1212
from menu.donut import DonutFinetuned
1313

14-
load_dotenv()
14+
load_dotenv(override=True)
1515
GEMINI_API_TOKEN = os.getenv("GEMINI_API_TOKEN", "")
1616
OPENAI_API_TOKEN = os.getenv("OPENAI_API_TOKEN", "")
1717

@@ -27,8 +27,8 @@
2727
MODEL_LIST = [
2828
"Donut Model",
2929
"gemini-2.0-flash",
30-
"gemini-2.5-flash-preview-04-17",
31-
"gemini-2.5-pro-preview-03-25",
30+
"gemini-2.5-flash-preview-05-20",
31+
"gemini-2.5-pro-preview-06-05",
3232
"gpt-4.1",
3333
"gpt-4o",
3434
"o4-mini"
@@ -54,7 +54,7 @@ def handle(image: np.ndarray, model: str, api_token: str) -> str:
5454
else:
5555
raise gr.Error("Invalid model selection. Please choose a valid model.")
5656

57-
return json.dumps(result, indent=4, ensure_ascii=False)
57+
return json.dumps(result, indent=4, ensure_ascii=False, sort_keys=True)
5858

5959
def UserInterface() -> gr.Interface:
6060
with gr.Blocks(

0 commit comments

Comments
 (0)