File size: 490 Bytes
8a1cab5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7781f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pandas as pd
import random
import gradio as gr

# تحميل بيانات الاقتباسات
quotes = pd.read_csv('quotes.csv')

# دالة لتوليد اقتباس
def display_quote():
    return random.choice(quotes['text'].tolist())

# إنشاء واجهة Gradio
interface = gr.Interface(
    fn=display_quote, 
    outputs='text', 
    title='Quote Generator', 
    description='Click the button to generate a random quote!'
)

# تشغيل الواجهة
interface.launch()