lucataco commited on
Commit
5d1600c
·
verified ·
1 Parent(s): 08437b7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -9
README.md CHANGED
@@ -1,18 +1,28 @@
1
  ---
2
- title: README
3
- emoji: 🐠
4
- colorFrom: yellow
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
8
  ---
9
 
10
- [Run AI with an API](https://replicate.com/)
11
 
12
- [Run and fine-tune open-source models](https://replicate.com/explore)
13
 
14
- Deploy custom models at scale, all with one line of code.
15
 
16
- Learn more about our Hugging Face integration at [replicate.com/blog/replicate-on-huggingface](https://replicate.com/blog/replicate-on-huggingface)
 
 
17
 
18
- Join our Discord to chat with the team [discord.gg/replicate](https://discord.gg/replicate)
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Replicate
3
+ emoji: 🚀
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: static
7
  pinned: false
8
  ---
9
 
10
+ # Run AI with an API
11
 
12
+ Replicate lets developers run, fine-tune, and deploy open models with a production-ready API. On Hugging Face, you can use Replicate as an Inference Provider for popular models across image generation, video generation, speech, and audio.
13
 
14
+ ## Get started
15
 
16
+ ```python
17
+ import os
18
+ from huggingface_hub import InferenceClient
19
 
20
+ client = InferenceClient(
21
+ provider="replicate",
22
+ api_key=os.environ["HF_TOKEN"],
23
+ )
24
+
25
+ image = client.text_to_image(
26
+ "A cinematic photo of an astronaut riding a horse",
27
+ model="Tongyi-MAI/Z-Image-Turbo",
28
+ )