Albaher / app.py
AlbaherTech's picture
Update app.py
42d843f verified
Raw History Blame Contribute Delete
484 Bytes
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()