import gradio as gr from transformers import pipeline chatbot = pipeline( "text-generation", model="riotu-lab/ArabianGPT-01B", max_new_tokens=150, do_sample=True, top_p=0.9 ) def respond(message): output = chatbot( message, max_new_tokens=150, do_sample=True, top_p=0.9 ) return output[0]["generated_text"] iface = gr.Interface( fn=respond, inputs=gr.Textbox(lines=2, placeholder="اكتب سؤالك هنا..."), outputs="text", title="🤖 شات ذكاء اصطناعي عربي", description="دردشة ذكية باللغة العربية باستخدام نموذج مجاني." ) if __name__ == "__main__": iface.launch() import gradio as gr from transformers import pipeline chatbot = pipeline( "text-generation", model="riotu-lab/ArabianGPT-01B", max_new_tokens=150, do_sample=True, top_p=0.9 ) def respond(message): output = chatbot( message, max_new_tokens=150, do_sample=True, top_p=0.9 ) return output[0]["generated_text"] iface = gr.Interface( fn=respond, inputs=gr.Textbox(lines=2, placeholder="اكتب سؤالك هنا..."), outputs="text", title="🤖 شات ذكاء اصطناعي عربي", description="دردشة ذكية باللغة العربية باستخدام نموذج مجاني." ) if __name__ == "__main__": iface.launch()