Skip to content

Commit c5ac526

Browse files
committed
Adjustments to the Azure OpenAI configuration.
1 parent aaa6fd9 commit c5ac526

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app_llm.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import copy
33
import json
44
import os
5-
65
import requests
76
import streamlit as st
87
from requests.auth import HTTPBasicAuth
98
from simpleeval import simple_eval
10-
119
from msfocr.data import dhis2
1210
from msfocr.doctr import ocr_functions as doctr_ocr_functions
1311
from msfocr.llm import ocr_functions
@@ -321,6 +319,10 @@ def authenticate():
321319

322320
dhis2.configure_DHIS2_server(username = st.session_state['username'], password=st.session_state['password'])
323321

322+
api_key = os.environ["AZURE_OPENAI_API_KEY"]
323+
azure_endpoint = os.environ['AZURE_OPENAI_ENDPOINT']
324+
ocr_functions.configure_azure_openai(api_key = api_key, azure_endpoint=azure_endpoint)
325+
324326
# File upload layout
325327
upload_holder = st.empty()
326328

0 commit comments

Comments
 (0)