Update app.py
Browse files
app.py
CHANGED
|
@@ -208,13 +208,13 @@ def calcul(math, francais, physique, svt, philo, eps, thea, hist, anglais):
|
|
| 208 |
return matha.trunc(r * 100) / 100
|
| 209 |
|
| 210 |
def mariam_web(pro):
|
| 211 |
-
|
| 212 |
-
|
| 213 |
|
| 214 |
-
|
| 215 |
-
|
| 216 |
return response
|
| 217 |
-
|
| 218 |
def mariam_chimi(chi,im):
|
| 219 |
|
| 220 |
prompt_chi = " tu es un expert en chimie, tu as 20 d'expreriance dans le domaine. reponds a cette question: " + chi
|
|
|
|
| 208 |
return matha.trunc(r * 100) / 100
|
| 209 |
|
| 210 |
def mariam_web(pro):
|
| 211 |
+
if not pro:
|
| 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(model=g4f.models.default,messages=[{"role": "user", "content":t_pro}],provider=Bard,cookies={"__Secure-1PSID": "bQg91E2ggGcxSbysMaqi7i_a71yETVbx779_2CWTMjnKyo2EhWr2xbDEoSRrsX47phTNpg.", "__Secure-1PSIDCC": "APoG2W-ldh3902I0dUkwXQQeEXKwqrQJXn54dmQNYHOAl1J8fEdhfIH2zB-jAOdtyz39Jojlsw"},auth=True)
|
| 216 |
return response
|
| 217 |
+
|
| 218 |
def mariam_chimi(chi,im):
|
| 219 |
|
| 220 |
prompt_chi = " tu es un expert en chimie, tu as 20 d'expreriance dans le domaine. reponds a cette question: " + chi
|