import gradio as gr from huggingface_hub import InferenceClient import os # Retrieve the token from an environment variable token = os.getenv("HF_TOKEN") client = InferenceClient(model="gpt2", token=token) def generate_response(prompt): response = client.text_generation(prompt) return response with gr.Blocks() as demo: gr.Markdown("