Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -93,9 +93,9 @@ if image_url:
|
|
93 |
##BLIP
|
94 |
caption = image_to_text(image_url, max_new_tokens=200)
|
95 |
initial_caption= caption[0]['generated_text']
|
96 |
-
|
97 |
##LLM
|
98 |
-
llm = ChatGoogleGenerativeAI(model="gemini-1.
|
99 |
safety_settings={
|
100 |
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
|
101 |
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
|
|
|
93 |
##BLIP
|
94 |
caption = image_to_text(image_url, max_new_tokens=200)
|
95 |
initial_caption= caption[0]['generated_text']
|
96 |
+
##gemini-1.0-pro-latest
|
97 |
##LLM
|
98 |
+
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro-latest", google_api_key=GOOGLE_API_KEY, temperature=0.2, top_p=1, top_k=1,
|
99 |
safety_settings={
|
100 |
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
|
101 |
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
|