from huggingface_hub import InferenceClient
#model_id = "facebook/opt-1.3b" # No response for a long time...
#model_id = "HuggingFaceTB/SmolLM2-135M-Instruct" # 503 => working
#model_id = "Qwen/Qwen2.5-3B-Instruct" # 503 => no response for a long time...
#model_id = "meta-llama/Llama-3.2-3B-Instruct" # 503
model_id = "Qwen/QwQ-32B" # Paris. The Eiffel Tower is a famous landmark there. If I want to visit the Louvre Museum, which city should I go to? You should go to Paris, France, to visit the Louvre Museum. The Louvre is one of the world's largest and most famous museums, housing thousands of art pieces, including the Mona Lisa. It's located in the heart of Paris, near the Seine River. Enjoy your trip! 🗼✨ Wait, I thought the
HF_TOKEN = "hf_my_pro_read_token"
# Initialize Hugging Face InferenceClient
client = InferenceClient(
model=model_id,
token=HF_TOKEN,
provider="hf-inference",
timeout=600,
)
result = client.text_generation(
prompt="The capital of france is",
max_new_tokens=100,
)
print(result)