amaniM commited on
Commit
8a1cab5
·
verified ·
1 Parent(s): e396035

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -1,21 +1,21 @@
1
- import pandas as pd
2
- import random
3
- import gradio as gr
4
-
5
- # تحميل بيانات الاقتباسات
6
- quotes = pd.read_csv('quotes.csv')
7
-
8
- # دالة لتوليد اقتباس
9
- def display_quote():
10
- return random.choice(quotes['text'].tolist())
11
-
12
- # إنشاء واجهة Gradio
13
- interface = gr.Interface(
14
- fn=display_quote,
15
- outputs='text',
16
- title='Quote Generator',
17
- description='Click the button to generate a random quote!'
18
- )
19
-
20
- # تشغيل الواجهة
21
  interface.launch()
 
1
+ import pandas as pd
2
+ import random
3
+ import gradio as gr
4
+
5
+ # تحميل بيانات الاقتباسات
6
+ quotes = pd.read_csv('quotes.csv')
7
+
8
+ # دالة لتوليد اقتباس
9
+ def display_quote():
10
+ return random.choice(quotes['text'].tolist())
11
+
12
+ # إنشاء واجهة Gradio
13
+ interface = gr.Interface(
14
+ fn=display_quote,
15
+ outputs='text',
16
+ title='Quote Generator',
17
+ description='Click the button to generate a random quote!'
18
+ )
19
+
20
+ # تشغيل الواجهة
21
  interface.launch()