Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -71,6 +71,8 @@ def gpt_francais_cc(image):
|
|
71 |
response = model.generate_content([pre, image])
|
72 |
print(response.text)
|
73 |
e = response.text
|
|
|
|
|
74 |
return e
|
75 |
|
76 |
markdown = r"""
|
@@ -91,6 +93,7 @@ app1 = gr.Interface(
|
|
91 |
inputs=[gr.Textbox(label="Sujet:", lines=3),gr.Radio(["Etaye","refute"]),gr.Radio(["raffiné","Normal"],label="Style d'ecriture")],
|
92 |
outputs=gr.Markdown(markdown, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]))
|
93 |
|
|
|
94 |
app2 = gr.Interface(
|
95 |
fn=gpt_francais_cc,
|
96 |
title="Mariam-Commentaire",
|
@@ -99,8 +102,13 @@ app2 = gr.Interface(
|
|
99 |
outputs=gr.Markdown(markdown,show_copy_button=True, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]),
|
100 |
allow_flagging="never",
|
101 |
css=css)
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
|
106 |
iface = gr.TabbedInterface([app1,app2],["Français TA", "Commentaire Composé"])
|
|
|
71 |
response = model.generate_content([pre, image])
|
72 |
print(response.text)
|
73 |
e = response.text
|
74 |
+
with open("rr.txt",'w') as var:
|
75 |
+
var.write(str(e))
|
76 |
return e
|
77 |
|
78 |
markdown = r"""
|
|
|
93 |
inputs=[gr.Textbox(label="Sujet:", lines=3),gr.Radio(["Etaye","refute"]),gr.Radio(["raffiné","Normal"],label="Style d'ecriture")],
|
94 |
outputs=gr.Markdown(markdown, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]))
|
95 |
|
96 |
+
"""
|
97 |
app2 = gr.Interface(
|
98 |
fn=gpt_francais_cc,
|
99 |
title="Mariam-Commentaire",
|
|
|
102 |
outputs=gr.Markdown(markdown,show_copy_button=True, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True }]),
|
103 |
allow_flagging="never",
|
104 |
css=css)
|
105 |
+
"""
|
106 |
+
app2 = gr.Interface(
|
107 |
+
fn=gpt_francais_cc,
|
108 |
+
title="Mariam-Commentaire",
|
109 |
+
description="Ah..banana banana...",
|
110 |
+
inputs= gr.Image(type='pil'),
|
111 |
+
outputs=gr.DownloadButton("yo",values="rr.txt")
|
112 |
|
113 |
|
114 |
iface = gr.TabbedInterface([app1,app2],["Français TA", "Commentaire Composé"])
|