GaborToth2 commited on
Commit
9570b85
·
1 Parent(s): 666a247

local API key

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,11 +1,9 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
 
3
 
4
- """
5
- For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
- """
7
- client = InferenceClient("microsoft/Phi-4-mini-instruct")
8
-
9
 
10
  def respond(
11
  message,
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
+ import os
4
 
5
+ HF_API_KEY = os.getenv("HF_API_KEY")
6
+ client = InferenceClient("microsoft/Phi-4-mini-instruct", token=HF_API_KEY)
 
 
 
7
 
8
  def respond(
9
  message,