esamai5 / app.py
esama's picture
تعديل app.py لاختبار التوكن
ed3293e verified
raw
history blame contribute delete
400 Bytes
import gradio as gr
import os
# قراءة التوكن من Secret
hf_token = os.getenv("esamoai5")
def chat_with_ai(message):
return f"توكنك يعمل! الرسالة: {message}"
iface = gr.Interface(
fn=chat_with_ai,
inputs=gr.Textbox(lines=2, placeholder="اكتب رسالتك هنا..."),
outputs=gr.Textbox(label="رد الذكاء الاصطناعي")
)
iface.launch()