Youssouf Traore
commited on
Commit
·
f1d9a04
1
Parent(s):
bdd283c
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,8 @@ title = "Mariam 💎"
|
|
4 |
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.
|
5 |
|
6 |
Mon numéro : +24165362371"""
|
|
|
|
|
7 |
#app 1
|
8 |
|
9 |
import requests
|
@@ -40,7 +42,7 @@ def infer(im):
|
|
40 |
|
41 |
#app 2
|
42 |
|
43 |
-
openai.api_key = "sk-
|
44 |
|
45 |
def gpt(prompt):
|
46 |
if not prompt:
|
@@ -62,11 +64,11 @@ def gpt(prompt):
|
|
62 |
|
63 |
|
64 |
#interface 1
|
65 |
-
app1 = gr.Interface(fn = infer,title="Mariam -Ocr ", inputs=[gr.Image(type="pil")], outputs=["text"])
|
66 |
#interface 2
|
67 |
|
68 |
-
app2 = gr.Interface(fn = gpt, inputs=gr.Textbox(label="Question:",lines=8), outputs=gr.Textbox())
|
69 |
|
70 |
-
demo = gr.TabbedInterface([app1, app2], ["OCR", "MARIAM-u"]
|
71 |
|
72 |
demo.launch()
|
|
|
4 |
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.
|
5 |
|
6 |
Mon numéro : +24165362371"""
|
7 |
+
|
8 |
+
description_ocr = """Quand tu finis d'importer le texte sélectionne le et copie le !!!!"""
|
9 |
#app 1
|
10 |
|
11 |
import requests
|
|
|
42 |
|
43 |
#app 2
|
44 |
|
45 |
+
openai.api_key = "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"
|
46 |
|
47 |
def gpt(prompt):
|
48 |
if not prompt:
|
|
|
64 |
|
65 |
|
66 |
#interface 1
|
67 |
+
app1 = gr.Interface(fn = infer,title="Mariam -Ocr ",description=description_ocr, inputs=[gr.Image(type="pil")], outputs=["text"])
|
68 |
#interface 2
|
69 |
|
70 |
+
app2 = gr.Interface(fn = gpt,title="Mariam-U", description=description, inputs=gr.Textbox(label="Question:",lines=8), outputs=gr.Textbox())
|
71 |
|
72 |
+
demo = gr.TabbedInterface([app1, app2], ["OCR", "MARIAM-u"])
|
73 |
|
74 |
demo.launch()
|