Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ class KeyValueExtractor:
|
|
52 |
"""
|
53 |
self.model = "facebook/bart-large-mnli"
|
54 |
self.client = AzureOpenAI(api_key=os.getenv("AZURE_OPENAI_KEY"),
|
55 |
-
api_version="
|
56 |
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
|
57 |
)
|
58 |
|
@@ -135,7 +135,7 @@ class KeyValueExtractor:
|
|
135 |
|
136 |
# Call OpenAI GPT-3.5-turbo
|
137 |
chat_completion = self.client.chat.completions.create(
|
138 |
-
model = "GPT-
|
139 |
messages = conversation,
|
140 |
max_tokens=1000,
|
141 |
temperature=0
|
@@ -173,7 +173,7 @@ class KeyValueExtractor:
|
|
173 |
|
174 |
# Call OpenAI GPT-3.5-turbo
|
175 |
chat_completion = self.client.chat.completions.create(
|
176 |
-
model = "GPT-
|
177 |
messages = conversation,
|
178 |
max_tokens=1000,
|
179 |
temperature=0
|
@@ -339,7 +339,7 @@ class KeyValueExtractor:
|
|
339 |
|
340 |
# Step 6: Load the summarization chain with Azure ChatGPT
|
341 |
chain = load_summarize_chain(
|
342 |
-
llm=AzureChatOpenAI(azure_deployment="GPT-
|
343 |
chain_type="refine",
|
344 |
question_prompt=prompt,
|
345 |
refine_prompt=refine_prompt,
|
@@ -378,8 +378,8 @@ class KeyValueExtractor:
|
|
378 |
|
379 |
def gradio_interface(self):
|
380 |
|
381 |
-
with gr.Blocks(css="style.css",theme=
|
382 |
-
gr.HTML("""<div><img src="https://www.broadridge.com/_assets/images/logos/br-pimary-blue-logo.svg" alt="Broadridge" style="float:left;width:200px;height:50px;"></div>""")
|
383 |
|
384 |
gr.HTML("""<center class="darkblue" text-align:center;padding:30px;'><center>
|
385 |
<center><h1 class ="center" style="color:#fff"></h1></center>
|
|
|
52 |
"""
|
53 |
self.model = "facebook/bart-large-mnli"
|
54 |
self.client = AzureOpenAI(api_key=os.getenv("AZURE_OPENAI_KEY"),
|
55 |
+
api_version="2024-02-01",
|
56 |
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
|
57 |
)
|
58 |
|
|
|
135 |
|
136 |
# Call OpenAI GPT-3.5-turbo
|
137 |
chat_completion = self.client.chat.completions.create(
|
138 |
+
model = "GPT-4o",
|
139 |
messages = conversation,
|
140 |
max_tokens=1000,
|
141 |
temperature=0
|
|
|
173 |
|
174 |
# Call OpenAI GPT-3.5-turbo
|
175 |
chat_completion = self.client.chat.completions.create(
|
176 |
+
model = "GPT-4o",
|
177 |
messages = conversation,
|
178 |
max_tokens=1000,
|
179 |
temperature=0
|
|
|
339 |
|
340 |
# Step 6: Load the summarization chain with Azure ChatGPT
|
341 |
chain = load_summarize_chain(
|
342 |
+
llm=AzureChatOpenAI(azure_deployment="GPT-4o"),
|
343 |
chain_type="refine",
|
344 |
question_prompt=prompt,
|
345 |
refine_prompt=refine_prompt,
|
|
|
378 |
|
379 |
def gradio_interface(self):
|
380 |
|
381 |
+
with gr.Blocks(css="style.css",theme='SherlockRamos/Feliz') as app:
|
382 |
+
gr.HTML("""<div><center><img src="https://www.broadridge.com/_assets/images/logos/br-pimary-blue-logo.svg" alt="Broadridge" style="float:left;width:200px;height:50px;"></center></div>""")
|
383 |
|
384 |
gr.HTML("""<center class="darkblue" text-align:center;padding:30px;'><center>
|
385 |
<center><h1 class ="center" style="color:#fff"></h1></center>
|