Download index.html from Siminbrzq/Infere: direct link, hf CLI and curl.
- Browser
- Download file 810 Bytes
-
https://huggingface.co/spaces/Siminbrzq/Infere/resolve/main/index.html
- Command line
-
hf download hf://spaces/Siminbrzq/Infere/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Siminbrzq/Infere/resolve/main/index.html
810 Bytes
| import os | |
| from huggingface_hub import InferenceClient | |
| client = InferenceClient( | |
| api_key=os.environ["HF_TOKEN"], | |
| ) | |
| stream = client.chat.completions.create( | |
| model="meta-models/Muse-Glimmer-30B:preferred", | |
| messages=[ | |
| { | |
| "role": "user", | |
| "content": [ | |
| { | |
| "type": "text", | |
| "text": "Describe this image in one sentence." | |
| }, | |
| { | |
| "type": "image_url", | |
| "image_url": { | |
| "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" | |
| } | |
| } | |
| ] | |
| } | |
| ], | |
| stream=True, | |
| ) | |
| for chunk in stream: | |
| print(chunk.choices[0].delta.content, end="") |