Spaces:
Runtime error
Runtime error
File size: 1,444 Bytes
a866ce8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
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()
|