You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/inference-providers/guides/building-first-app.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,10 @@ We'll also need to implement the `transcribe` and `summarize` functions.
177
177
<hfoptions id="transcription">
178
178
<hfoption id="python">
179
179
180
-
Now let's implement the transcription using `fal.ai` and OpenAI's `whisper-large-v3` model for fast, reliable speech processing:
180
+
Now let's implement the transcription using OpenAI's `whisper-large-v3` model for fast, reliable speech processing.
181
+
<Tip>
182
+
We'll use the `auto` provider to automatically select the first available provider for the model. You can define your own priority list of providers in the [Inference Providers](https://huggingface.co/settings/inference-providers) page.
Using the `auto` provider will automatically select the best provider for the model we're using.
197
199
198
200
</hfoption>
199
201
<hfoption id="javascript">
200
202
201
-
We'll use the Hugging Face Inference client with automatic provider selection:
203
+
Now let's implement the transcription using OpenAI's `whisper-large-v3` model for fast, reliable speech processing.
204
+
<Tip>
205
+
We'll use the `auto` provider to automatically select the first available provider for the model. You can define your own priority list of providers in the [Inference Providers](https://huggingface.co/settings/inference-providers) page.
@@ -216,7 +221,6 @@ async function transcribe(file) {
216
221
}
217
222
```
218
223
219
-
Using the `auto` provider will automatically select the best provider for the model we're using.
220
224
221
225
</hfoption>
222
226
</hfoptions>
@@ -226,13 +230,8 @@ Using the `auto` provider will automatically select the best provider for the mo
226
230
<hfoptions id="summarization">
227
231
<hfoption id="python">
228
232
229
-
Next, we'll use a powerful language model like `deepseek-ai/DeepSeek-R1-0528` from DeepSeek via an Inference Provider.
230
-
231
-
<Tip>
232
-
233
-
We'll use the `auto` provider to automatically select the best provider for the model. You can define your own priority list of providers in the [Inference Providers](https://huggingface.co/settings/inference-providers) page.
234
-
235
-
</Tip>
233
+
Next, we'll use a powerful language model like `deepseek-ai/DeepSeek-R1-0528` from DeepSeek via an Inference Provider, and just like in the previous step, we'll use the `auto` provider to automatically select the first available provider for the model.
234
+
We will define a custom prompt to ensure the output is formatted as a summary with action items and decisions made:
Note, we're also defining a custom summary prompt to ensure the output is formatted as a summary with action items and decisions made.
266
264
267
265
</hfoption>
268
266
<hfoptionid="javascript">
269
267
270
-
We'll use the chat completion API with automatic provider selection again, and define a custom prompt to ensure the output is formatted as a summary with action items and decisions made:
268
+
Next, we'll use a powerful language model like `deepseek-ai/DeepSeek-R1-0528` from DeepSeek via an Inference Provider, and just like in the previous step, we'll use the `auto` provider to automatically select the first available provider for the model.
269
+
We will define a custom prompt to ensure the output is formatted as a summary with action items and decisions made:
271
270
272
271
```javascript
273
272
asyncfunctionsummarize(transcript) {
@@ -302,7 +301,6 @@ async function summarize(transcript) {
302
301
}
303
302
```
304
303
305
-
We're using automatic provider selection which will choose the best available provider for the model.
306
304
307
305
</hfoption>
308
306
</hfoptions>
@@ -405,7 +403,7 @@ To deploy, we'll need to create a new Space and upload our files.
405
403
406
404
1. **Create a new Space**: Go to [huggingface.co/new-space](https://huggingface.co/new-space)
407
405
2. **Choose Gradio SDK** and make it public
408
-
3. **Upload your files**: Upload `app.py` and `requirements.txt`
406
+
3. **Upload your files**: Upload `app.py`
409
407
4. **Add your token**: In Space settings, add `HF_TOKEN` as a secret (get it from [your settings](https://huggingface.co/settings/tokens))
410
408
5. **Launch**: Your app will be live at `https://huggingface.co/spaces/your-username/your-space-name`
0 commit comments