13ilguun commited on
Commit
2ef2764
·
1 Parent(s): 6242921

Update: Fixed invalid username and password error

Browse files
Files changed (2) hide show
  1. .gitignore +2 -1
  2. app.py +8 -1
.gitignore CHANGED
@@ -1 +1,2 @@
1
- venv/
 
 
1
+ venv/
2
+ .env
app.py CHANGED
@@ -1,10 +1,17 @@
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("HuggingFaceH4/zephyr-7b-beta")
 
 
 
8
 
9
 
10
  def respond(
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
+ import os
4
+ from dotenv import load_dotenv
5
+
6
+ load_dotenv()
7
 
8
  """
9
  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
10
  """
11
+ client = InferenceClient(
12
+ model="HuggingFaceH4/zephyr-7b-beta",
13
+ token=os.getenv("huggingface_token")
14
+ )
15
 
16
 
17
  def respond(