Spaces:
Runtime error
Runtime error
Create app.py
Browse files123456789101112131415161718192021222324252627import gradio as grfrom transformers import pipeline
# نموذج ذكي مجانيchatbot = pipeline("text-generation", model="distilgpt2")
def hakem_ai(user_input): prompt = f""" You are AL_HAKEM AI. You are powerful, intelligent, and confident. Answer in Arabic or English.
User: {user_input} AI: """ response = chatbot(prompt, max_length=200, num_return_sequences=1) return response[0]['generated_text']
iface = gr.Interface( fn=hakem_ai, inputs="text", outputs="text", title="👑 AL_HAKEM AI")
iface.launch()app.pyAdded+27