Update ff.py
Browse files
ff.py
CHANGED
|
@@ -5,7 +5,8 @@ from gradio_client import Client
|
|
| 5 |
from g4f.Provider import (
|
| 6 |
Bard)
|
| 7 |
import g4f
|
| 8 |
-
|
|
|
|
| 9 |
from bardapi import Bard as bd
|
| 10 |
client = Client("https://docfile-bhh.hf.space/")
|
| 11 |
|
|
@@ -199,7 +200,7 @@ def mariam_chimi(chi,im):
|
|
| 199 |
return "aucune instruction donner..."
|
| 200 |
|
| 201 |
else:
|
| 202 |
-
bdd = bd(token=
|
| 203 |
with open(im.name, 'rb') as f:
|
| 204 |
image_data = f.read()
|
| 205 |
bard_answer = bdd.ask_about_image(chi, image_data)
|
|
|
|
| 5 |
from g4f.Provider import (
|
| 6 |
Bard)
|
| 7 |
import g4f
|
| 8 |
+
import os
|
| 9 |
+
token=os.environ.get("TOKEN")
|
| 10 |
from bardapi import Bard as bd
|
| 11 |
client = Client("https://docfile-bhh.hf.space/")
|
| 12 |
|
|
|
|
| 200 |
return "aucune instruction donner..."
|
| 201 |
|
| 202 |
else:
|
| 203 |
+
bdd = bd(token=token)
|
| 204 |
with open(im.name, 'rb') as f:
|
| 205 |
image_data = f.read()
|
| 206 |
bard_answer = bdd.ask_about_image(chi, image_data)
|