Vinit710 commited on
Commit
7d777fb
·
verified ·
1 Parent(s): 40c7962

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -1,15 +1,11 @@
1
  import gradio as gr
2
- from huggingface_hub import InferenceClient
3
  import os
4
- from dotenv import load_dotenv
5
-
6
- # Load environment variables from a .env file if available
7
- load_dotenv()
8
 
9
- # Read your Hugging Face token from an environment variable
10
  HF_TOKEN = os.getenv("HF_TOKEN")
11
 
12
- # Initialize client with token
13
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=HF_TOKEN)
14
 
15
 
 
1
  import gradio as gr
 
2
  import os
3
+ from huggingface_hub import InferenceClient
 
 
 
4
 
5
+ # Get the Hugging Face token from the environment (Secrets in Space settings)
6
  HF_TOKEN = os.getenv("HF_TOKEN")
7
 
8
+ # Initialize client with model and token
9
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=HF_TOKEN)
10
 
11