import gradio as gr from huggingface_hub import InferenceClient client = InferenceClient("HuggingFaceH4/zephyr-7b-beta") def ai_tutor(message, history): response = client.chat_completion( messages=[{"role": "user", "content": message}], max_tokens=200 ) return response.choices[0].message.content demo = gr.ChatInterface( fn=ai_tutor, title="SIUT AITutor", description="An AI-powered tutor helping students learn AI, cybersecurity, and programming." ) demo.launch()