uo
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
import math as matha
|
| 2 |
-
import gradio as gr
|
| 3 |
|
| 4 |
title_c = "Calculateur de moyenne !"
|
| 5 |
description_c = """Entrez vos notes pour chaque matière pour calculer votre moyenne.
|
|
@@ -14,7 +14,10 @@ Exemple : 12,5 devient 12.5
|
|
| 14 |
|
| 15 |
description_r = """ En cours.... mais en vérité tout dépendra de mon humeur........ """
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
math = math * 5
|
| 19 |
francais = francais * 3
|
| 20 |
physique = physique * 4
|
|
@@ -47,8 +50,7 @@ def calcul(math, francais, physique, svt, philo, documentation, thea,anglais,his
|
|
| 47 |
|
| 48 |
def cr(t):
|
| 49 |
print(f"ho: {t}")
|
| 50 |
-
|
| 51 |
-
|
| 52 |
|
| 53 |
|
| 54 |
app1 = gr.Interface(
|
|
@@ -64,8 +66,6 @@ app1 = gr.Interface(
|
|
| 64 |
gr.Number(label="Histoire"),
|
| 65 |
gr.Number(label="Anglais"),
|
| 66 |
gr.Number(label="Espagnol"),
|
| 67 |
-
|
| 68 |
-
|
| 69 |
],
|
| 70 |
outputs=gr.Textbox(label="Moyenne"),
|
| 71 |
description=description_c,
|
|
@@ -73,14 +73,12 @@ app1 = gr.Interface(
|
|
| 73 |
|
| 74 |
app2 = gr.Interface(
|
| 75 |
fn=cr,
|
| 76 |
-
inputs=
|
| 77 |
outputs=gr.Textbox(),
|
| 78 |
description=description_r,
|
| 79 |
)
|
| 80 |
|
| 81 |
|
|
|
|
| 82 |
|
| 83 |
-
demo
|
| 84 |
-
|
| 85 |
-
demo.launch(show_api = False)
|
| 86 |
-
|
|
|
|
| 1 |
+
import math as matha
|
| 2 |
+
import gradio as gr
|
| 3 |
|
| 4 |
title_c = "Calculateur de moyenne !"
|
| 5 |
description_c = """Entrez vos notes pour chaque matière pour calculer votre moyenne.
|
|
|
|
| 14 |
|
| 15 |
description_r = """ En cours.... mais en vérité tout dépendra de mon humeur........ """
|
| 16 |
|
| 17 |
+
|
| 18 |
+
def calcul(
|
| 19 |
+
math, francais, physique, svt, philo, documentation, thea, anglais, hist, espagnol
|
| 20 |
+
):
|
| 21 |
math = math * 5
|
| 22 |
francais = francais * 3
|
| 23 |
physique = physique * 4
|
|
|
|
| 50 |
|
| 51 |
def cr(t):
|
| 52 |
print(f"ho: {t}")
|
| 53 |
+
return " ah.... "
|
|
|
|
| 54 |
|
| 55 |
|
| 56 |
app1 = gr.Interface(
|
|
|
|
| 66 |
gr.Number(label="Histoire"),
|
| 67 |
gr.Number(label="Anglais"),
|
| 68 |
gr.Number(label="Espagnol"),
|
|
|
|
|
|
|
| 69 |
],
|
| 70 |
outputs=gr.Textbox(label="Moyenne"),
|
| 71 |
description=description_c,
|
|
|
|
| 73 |
|
| 74 |
app2 = gr.Interface(
|
| 75 |
fn=cr,
|
| 76 |
+
inputs=gr.Textbox(),
|
| 77 |
outputs=gr.Textbox(),
|
| 78 |
description=description_r,
|
| 79 |
)
|
| 80 |
|
| 81 |
|
| 82 |
+
demo = gr.TabbedInterface([app1, app2], ["Calcule-1ere S2 ", "Terminal A1"])
|
| 83 |
|
| 84 |
+
demo.launch(show_api=False)
|
|
|
|
|
|
|
|
|