Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,18 +64,39 @@ def gpt_francais(french_prompt, choix, autheur):
|
|
64 |
e = response.text
|
65 |
return e
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
markdown = r"""
|
68 |
{e}
|
69 |
""".format(e=e)
|
70 |
|
71 |
|
72 |
|
73 |
-
|
74 |
fn=gpt_francais,
|
75 |
title="Mariam-French",
|
76 |
description=description_french,
|
77 |
inputs=[gr.Textbox(label="Sujet:", lines=3),gr.Radio(["Etaye","refute"]),gr.Radio(["raffiné","Normal"],label="Style d'ecriture")],
|
78 |
outputs=gr.Markdown(markdown, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]))
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
iface.launch()
|
|
|
64 |
e = response.text
|
65 |
return e
|
66 |
|
67 |
+
def gpt_francais_cc(image):
|
68 |
+
|
69 |
+
pre = "de quoi ca parle."
|
70 |
+
|
71 |
+
response = model.generate_content([pre, image])
|
72 |
+
print(response.text)
|
73 |
+
e = response.text
|
74 |
+
return e
|
75 |
+
|
76 |
markdown = r"""
|
77 |
{e}
|
78 |
""".format(e=e)
|
79 |
|
80 |
|
81 |
|
82 |
+
app1 = gr.Interface(
|
83 |
fn=gpt_francais,
|
84 |
title="Mariam-French",
|
85 |
description=description_french,
|
86 |
inputs=[gr.Textbox(label="Sujet:", lines=3),gr.Radio(["Etaye","refute"]),gr.Radio(["raffiné","Normal"],label="Style d'ecriture")],
|
87 |
outputs=gr.Markdown(markdown, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]))
|
88 |
|
89 |
+
app2 = gr.Interface(
|
90 |
+
fn=gpt_philo,
|
91 |
+
title="Mariam-Commentaire",
|
92 |
+
description="Ah..banana banana...",
|
93 |
+
inputs= gr.Files(),
|
94 |
+
outputs=gr.Markdown(markdown, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]))
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
iface = gr.TabbedInterface([app1,app2],["Mariam-Philo-Cc", "Mariam-Philo"])
|
100 |
+
|
101 |
|
102 |
iface.launch()
|