Docfile commited on
Commit
0a9dfd4
·
1 Parent(s): 5adc9d6

Update ff.py

Browse files
Files changed (1) hide show
  1. ff.py +3 -2
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='bwg91Iygc25J0aTg0ZnoY67_lXLwbhMqloeHH3SRPOkldVArhW9yDClbODrn7d64r6ErVg.')
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)