File size: 1,985 Bytes
c9f72b1
 
4085e56
 
 
 
e770cc2
4085e56
 
cf123a3
98fc808
c9f72b1
cf123a3
e770cc2
32e10f5
 
f8e5021
c9f72b1
cf123a3
e770cc2
32e10f5
e770cc2
32e10f5
f8e5021
28d29a9
cf123a3
c15e338
1d65a10
32e10f5
e770cc2
32e10f5
f8e5021
70719fd
e770cc2
 
491dadd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import gradio as gr

description = "ุงู„ุชุนุฑู ุนู„ู‰ ุฎุงุตูŠุงุช ุงู„ุจูŠุช ุงู„ุดุนุฑูŠ"
title = """ู‡ุฐุง ุงู„ุจุฑู†ุงู…ุฌ ูŠู‚ูˆู… ุจุงู„ุชุนุฑู ุนู„ู‰ ู…ุฎุชู„ู ุฎุงุตูŠุงุช ุงู„ุจูŠุช ู…ู† ุงู„ุดุนุฑ.
ูŠู…ูƒู†ูƒู… ุฅุฎุชูŠุงุฑ ุงู„ุฎุงุตูŠุฉ ู…ู† ุจูŠู†:
- ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุจุญุฑ
- ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุฑูˆูŠ
ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ู…ูˆุถูˆุน-"""

examples = [["ุณูŽู„ูˆ ู‚ูŽู„ุจูŠ ุบูŽุฏุงุฉูŽ ุณูŽู„ุง ูˆูŽุซุงุจุง ู„ูŽุนูŽู„ูŽู‘ ุนูŽู„ู‰ ุงู„ุฌูŽู…ุงู„ู ู„ูŽู‡ู ุนูุชุงุจุง"], ["ู‚ูุง ู†ุจูƒ ู…ู† ุฐููƒุฑู‰ ุญุจูŠุจ ูˆู…ู†ุฒู„ู ุจุณูู‚ุทู ุงู„ู„ูู‘ูˆู‰ ุจูŠู†ูŽ ุงู„ุฏูŽู‘ุฎูˆู„ ูุญูŽูˆู’ู…ู„ู"]]


meter = gr.Interface.load("huggingface/Yah216/Arabic_poem_meter_3",
                        description="ู…ู† ูุถู„ูƒุŒ ุฃุฏุฎู„ ุงู„ุจูŠุช ุงู„ุดุนุฑูŠ ุงู„ุฐูŠ ุชูˆุฏ ุงู„ุชุนุฑู ุนู„ูŠู‡",
                        examples=examples, title = "ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุจุญุฑ",
                          inputs = gr.inputs.Textbox(lines = 3, label = "ุงู„ุจูŠุช")

)
qafiyah = gr.Interface.load("huggingface/Yah216/Poem_Qafiyah_Detection",
                         title ="ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุฑูˆูŠ",
                         examples=examples,
                         description="ู…ู† ูุถู„ูƒุŒ ุฃุฏุฎู„ ุงู„ุจูŠุช ุงู„ุดุนุฑูŠ ุงู„ุฐูŠ ุชูˆุฏ ุงู„ุชุนุฑู ุนู„ูŠู‡",
                         inputs = gr.inputs.Textbox(lines = 3, label = "ุงู„ุจูŠุช")
 
)
subject = gr.Interface.load(
              "huggingface/zenkri/autotrain-Arabic_Poetry_by_Subject-920730230",
               title="ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ู…ูˆุถูˆุน",
               examples=examples,
               description="ู…ู† ูุถู„ูƒุŒ ุฃุฏุฎู„ ุงู„ุจูŠุช ุงู„ุดุนุฑูŠ ุงู„ุฐูŠ ุชูˆุฏ ุงู„ุชุนุฑู ุนู„ูŠู‡",
                inputs = gr.inputs.Textbox(lines = 3, label = "ุงู„ุจูŠุช")

)
new_demo = gr.TabbedInterface([meter, qafiyah, subject], ["ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุจุญุฑ","ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุฑูˆูŠ","ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ู…ูˆุถูˆุน"])
new_demo.launch()