import gradio as gr from ff import * title = "Mariam 💎" description = """" Banana Banana ? 👀 bon ok ok. Bref comme vous le voyez c'est simple ! Pas besoin d'explication. C'est un script simple, c'est basé sur néoX, python, et gradio. Mon numéro : +24165362371""" title_c = "Calculateur de moyenne !" description_c = """Entrez vos notes pour chaque matière pour calculer votre moyenne. Note : les coefficients de cette app sont adaptés à la classe de première S uniquement. Je ferais une mise à jour plus tard si j'ai le temps. la conduite est fixé à 14/20. Et ici la virgule s'écrit avec le point. Exemple : 12,5 devient 12.5 Contact : +241065362371""" description_hist = """" C'est comme tu vois là. avant de cliquer sur soumettre precise les differents points que tu veux aborder. exemple : p1 = Cause p2 = manifestation p3 = resolution """ description_ocr = ( """ ici c'est juste pour extraire le texte d'une image... juste ça...""" ) title_f = "Travail argumentative" description_french = " Esseu je dois encore expliquer ?" # app 1 # interface 1 app1 = gr.Interface( fn=infer, title="Mariam -Ocr ", description=description_ocr, inputs=[gr.Image(type="pil")], outputs=["text"], ) # interface 2 app2 = gr.Interface( fn=gpt, title="Mariam-U", description=description, inputs=gr.Textbox(label="Question:", lines=4), outputs=gr.Textbox(), ) # interface3 app3 = gr.Interface( fn=gpt_francais, title="Mariam-French", description=description_french, inputs=[gr.Textbox(label="Sujet:", lines=3),gr.Radio(["Etaye","refute"]),gr.Radio(["Victor Hugo","Marcel Proust","Albert Camus","Marguerite Duras","Gustave Flaubert","Prof"],label="Style d'ecriture")], outputs=gr.Textbox(), ) app9 = gr.Interface( fn=philo_cc, title="Mariam-Philo-Cc", description=description_french, inputs=[gr.Textbox(label="Sujet:", lines=3)], outputs=gr.Textbox(), ) # interface4 app4 = gr.Interface( fn=gpt_philo, title="Mariam-Philo", description="Ah..banana banana...", inputs=[gr.Textbox(label="Sujet:", lines=3),gr.Radio(["Prof","René Descartes","Voltaire","Jean-Jacques Rousseau","Michel de Montaigne","Albert Camus"],label="Style d'ecriture")], outputs=gr.Textbox(), ) #interface6 app6 = gr.Interface( fn=gpt_hist, title="Mariam-Hist", description=description_hist, inputs=[gr.Textbox(label="Sujet:", lines=2),gr.Textbox(label="point1:", lines=1), gr.Textbox(label="point2:", lines=1), gr.Textbox(label="point3:", lines=1) ], outputs=gr.Textbox(), ) """ #interface7 app7= gr.Interface( fn=search, title="Mariam-theatre", description=description_thea, inputs=[gr.Textbox(label="Label:", lines=4) ], outputs=gr.Textbox(), ) """ # interface5 app5 = gr.Interface( fn=calcul, inputs=[ gr.Number(label="Math"), gr.Number(label="Français"), gr.Number(label="Physique"), gr.Number(label="SVT"), gr.Number(label="Philo"), gr.Number(label="EPS"), gr.Number(label="Théâtre"), gr.Number(label="Histoire"), gr.Number(label="Anglais"), ], outputs=gr.Textbox(label="Moyenne"), description=description_c, ) app7 = gr.Interface( fn=mariam_web, title="Mariam-web", inputs=gr.Textbox(label="Question:", lines=4), outputs=gr.Textbox(), ) app8 = gr.Interface( fn = mariam_chimi, title="Mariam-chimi", inputs=[gr.Textbox(),gr.File()], outputs=gr.Textbox(), ) demo = gr.TabbedInterface([app1, app2, app3,app9,app4,app6,app5,app7,app8],["OCR", "MARIAM-u", "Mariam-French","Mariam-Philo-Cc", "Mariam-Philo","Mariam-Hist","Note Calc","Mariam_web", "Mariam-chimi"]) demo.launch()