Spaces:
Build error
Build error
Commit ·
b30f1b3
1
Parent(s): 12367d4
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,9 +79,9 @@ session_token = os.environ.get("SessionToken")
|
|
| 79 |
def generate_caption(object_list_str, api_key, temperature):
|
| 80 |
query = f"You are an intelligent image captioner. I will hand you the objects and their position, and you should give me a detailed description for the photo. In this photo we have the following objects\n{object_list_str}"
|
| 81 |
llm = OpenAIChat(
|
| 82 |
-
model_name="gpt-
|
| 83 |
)
|
| 84 |
-
# not gpt-
|
| 85 |
|
| 86 |
try:
|
| 87 |
caption = llm(query)
|
|
|
|
| 79 |
def generate_caption(object_list_str, api_key, temperature):
|
| 80 |
query = f"You are an intelligent image captioner. I will hand you the objects and their position, and you should give me a detailed description for the photo. In this photo we have the following objects\n{object_list_str}"
|
| 81 |
llm = OpenAIChat(
|
| 82 |
+
model_name="gpt-3.5-turbo", openai_api_key=api_key, temperature=temperature
|
| 83 |
)
|
| 84 |
+
# not gpt-4 yet!
|
| 85 |
|
| 86 |
try:
|
| 87 |
caption = llm(query)
|