Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
import math as matha
|
5 |
-
|
|
|
|
|
6 |
from gradio_client import Client
|
7 |
|
8 |
client = Client("https://docfile-bhh.hf.space/")
|
@@ -210,9 +212,15 @@ def mariam_web(pro):
|
|
210 |
return "Veuillez saisir une question."
|
211 |
|
212 |
t_pro = " agis en tant q'ia appele mariam et creer par youssouf. ton role est uniquement d'assister. reponds a cette question: " + pro
|
213 |
-
|
214 |
-
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
def mariam_chimi(chi,im):
|
218 |
|
|
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
import math as matha
|
5 |
+
from g4f.Provider import (
|
6 |
+
Bard)
|
7 |
+
import g4f
|
8 |
from gradio_client import Client
|
9 |
|
10 |
client = Client("https://docfile-bhh.hf.space/")
|
|
|
212 |
return "Veuillez saisir une question."
|
213 |
|
214 |
t_pro = " agis en tant q'ia appele mariam et creer par youssouf. ton role est uniquement d'assister. reponds a cette question: " + pro
|
215 |
+
response = g4f.ChatCompletion.create(
|
216 |
+
model=g4f.models.default,
|
217 |
+
messages=[{"role": "user", "content":t_pro}],
|
218 |
+
provider=Bard,
|
219 |
+
#cookies=g4f.get_cookies(".google.com"),
|
220 |
+
cookies={"__Secure-1PSID": "bQg91E2ggGcxSbysMaqi7i_a71yETVbx779_2CWTMjnKyo2EhWr2xbDEoSRrsX47phTNpg.", "__Secure-1PSIDCC": "APoG2W-ldh3902I0dUkwXQQeEXKwqrQJXn54dmQNYHOAl1J8fEdhfIH2zB-jAOdtyz39Jojlsw"},
|
221 |
+
auth=True)
|
222 |
+
print(response)
|
223 |
+
return response
|
224 |
|
225 |
def mariam_chimi(chi,im):
|
226 |
|