amaniM commited on
Commit
37fd077
·
verified ·
1 Parent(s): 56aba54

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +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()