Update app.py
Browse files
app.py
CHANGED
|
@@ -207,6 +207,7 @@ def calcul(math, francais, physique, svt, philo, eps, thea, hist, anglais):
|
|
| 207 |
r = total / 28
|
| 208 |
return matha.trunc(r * 100) / 100
|
| 209 |
|
|
|
|
| 210 |
def mariam_web(pro):
|
| 211 |
if not pro:
|
| 212 |
return "Veuillez saisir une question."
|
|
@@ -214,7 +215,8 @@ def mariam_web(pro):
|
|
| 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
|
|
@@ -315,14 +317,14 @@ app5 = gr.Interface(
|
|
| 315 |
description=description_c,
|
| 316 |
)
|
| 317 |
|
| 318 |
-
|
| 319 |
app7 = gr.Interface(
|
| 320 |
fn=mariam_web,
|
| 321 |
title="Mariam-web",
|
| 322 |
inputs=gr.Textbox(label="Question:", lines=4),
|
| 323 |
outputs=gr.Textbox(),
|
| 324 |
)
|
| 325 |
-
|
| 326 |
|
| 327 |
|
| 328 |
app8 = gr.Interface(
|
|
@@ -332,7 +334,7 @@ app8 = gr.Interface(
|
|
| 332 |
outputs=gr.Textbox(),
|
| 333 |
)
|
| 334 |
|
| 335 |
-
demo = gr.TabbedInterface([app1, app2, app3,app4,app6,app5,
|
| 336 |
|
| 337 |
|
| 338 |
|
|
|
|
| 207 |
r = total / 28
|
| 208 |
return matha.trunc(r * 100) / 100
|
| 209 |
|
| 210 |
+
"""
|
| 211 |
def mariam_web(pro):
|
| 212 |
if not pro:
|
| 213 |
return "Veuillez saisir une question."
|
|
|
|
| 215 |
t_pro = " agis en tant q'ia appele mariam et creer par youssouf. ton role est uniquement d'assister. reponds a cette question: " + pro
|
| 216 |
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)
|
| 217 |
return response
|
| 218 |
+
|
| 219 |
+
"""
|
| 220 |
def mariam_chimi(chi,im):
|
| 221 |
|
| 222 |
prompt_chi = " tu es un expert en chimie, tu as 20 d'expreriance dans le domaine. reponds a cette question: " + chi
|
|
|
|
| 317 |
description=description_c,
|
| 318 |
)
|
| 319 |
|
| 320 |
+
"""
|
| 321 |
app7 = gr.Interface(
|
| 322 |
fn=mariam_web,
|
| 323 |
title="Mariam-web",
|
| 324 |
inputs=gr.Textbox(label="Question:", lines=4),
|
| 325 |
outputs=gr.Textbox(),
|
| 326 |
)
|
| 327 |
+
"""
|
| 328 |
|
| 329 |
|
| 330 |
app8 = gr.Interface(
|
|
|
|
| 334 |
outputs=gr.Textbox(),
|
| 335 |
)
|
| 336 |
|
| 337 |
+
demo = gr.TabbedInterface([app1, app2, app3,app4,app6,app5,app8],["OCR", "MARIAM-u", "Mariam-French", "Mariam-Philo","Mariam-Hist", "Note Calc","Mariam-chimi"])
|
| 338 |
|
| 339 |
|
| 340 |
|