Spaces:
Sleeping
Sleeping
File size: 484 Bytes
7585302 42d843f 7585302 42d843f 7585302 d00ad61 42d843f d00ad61 42d843f d00ad61 42d843f d00ad61 42d843f d00ad61 42d843f d00ad61 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import gradio as gr
from huggingface_hub import InferenceClient
client = InferenceClient(model="meta-llama/Llama-3.2-1B-Instruct")
def chat(message, history):
response = client.text_generation(
message,
max_new_tokens=200,
temperature=0.7,
top_p=0.9,
)
return response
gr.ChatInterface(
fn=chat,
title="Albaher AI Assistant",
description="مساعد ذكاء صناعي مجاني يعمل عبر HuggingFace API"
).launch()
|