tharun1507 commited on
Commit
c7b4ddf
·
verified ·
1 Parent(s): f9526d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,9 @@
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
-
4
  # ✅ Add your Hugging Face API token here
5
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=hf_api_token)
6
 
7
  def explain_and_run_code(code_snippet):
8
  system_message = "You are an expert assistant that explains Python code snippets clearly and concisely."
 
1
+ import os
2
  import gradio as gr
3
  from huggingface_hub import InferenceClient
4
+ hfapi_token=os.getenv('hf_api_token')
5
  # ✅ Add your Hugging Face API token here
6
+ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta", token=hfapi_token)
7
 
8
  def explain_and_run_code(code_snippet):
9
  system_message = "You are an expert assistant that explains Python code snippets clearly and concisely."