Spaces:
Running
Running
dialogueeeeee
commited on
Commit
·
aa1e3ae
1
Parent(s):
bbadc82
Add application file
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from openai import OpenAI, AzureOpenAI
|
|
8 |
engine = "gpt-4o"
|
9 |
api_key = "9e95c7efd64648bd86cd2fcfbe17905b"
|
10 |
api_base = "https://chatpartner-miniprogram.openai.azure.com/"
|
11 |
-
api_version = "2024-
|
12 |
client = AzureOpenAI(api_key=api_key, azure_endpoint=api_base, api_version=api_version)
|
13 |
|
14 |
class ImageProcessor:
|
@@ -86,7 +86,7 @@ def process_input(text=None, images=None, audio=None):
|
|
86 |
|
87 |
try:
|
88 |
processed_image_result = image_processor.process_images(image_bytes_list)
|
89 |
-
prompt += f"\n
|
90 |
except Exception as e:
|
91 |
return f"Error processing image: {e}", None
|
92 |
|
|
|
8 |
engine = "gpt-4o"
|
9 |
api_key = "9e95c7efd64648bd86cd2fcfbe17905b"
|
10 |
api_base = "https://chatpartner-miniprogram.openai.azure.com/"
|
11 |
+
api_version = "2024-08-01-preview"
|
12 |
client = AzureOpenAI(api_key=api_key, azure_endpoint=api_base, api_version=api_version)
|
13 |
|
14 |
class ImageProcessor:
|
|
|
86 |
|
87 |
try:
|
88 |
processed_image_result = image_processor.process_images(image_bytes_list)
|
89 |
+
prompt += f"\n乐谱的内容如下,这是一首杜维诺伊的曲子,请你根据他的曲风回答问题: {processed_image_result}"
|
90 |
except Exception as e:
|
91 |
return f"Error processing image: {e}", None
|
92 |
|