Update ff.py
Browse files
ff.py
CHANGED
@@ -261,21 +261,15 @@ def mariam_web(pro):
|
|
261 |
return response
|
262 |
|
263 |
|
264 |
-
def mariam_chimi(chi,im):
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
image_data = f.read()
|
277 |
-
bard_answer = bard.ask_about_image(chi, image_data)
|
278 |
-
return bard_answer['content']
|
279 |
-
|
280 |
-
|
281 |
-
#fin
|
|
|
261 |
return response
|
262 |
|
263 |
|
264 |
+
def mariam_chimi(chi, im):
|
265 |
+
prompt_chi = " tu es un expert en chimie, tu as 20 d'expreriance dans le domaine. reponds a cette question: " + chi
|
266 |
+
if not im:
|
267 |
+
answer = res(prompt_chi)
|
268 |
+
return answer
|
269 |
+
elif not chi:
|
270 |
+
return "aucune instruction donner..."
|
271 |
+
else:
|
272 |
+
with open(im.name, 'rb') as f:
|
273 |
+
image_data = f.read()
|
274 |
+
bard_answer = bard.ask_about_image(chi, image_data)
|
275 |
+
return bard_answer['content']
|
|
|
|
|
|
|
|
|
|
|
|