dodd869 commited on
Commit
39d2fb8
·
verified ·
1 Parent(s): fc40b79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -2,6 +2,10 @@ import os
2
  import gradio as gr
3
  from huggingface_hub import InferenceClient
4
 
 
 
 
 
5
  def respond(message, history):
6
  client = InferenceClient(token=HF_TOKEN, model="Qwen/Qwen3-Next-80B-A3B-Instruct")
7
  messages = [{"role": "system", "content": "You are a helpful assistant."}]
 
2
  import gradio as gr
3
  from huggingface_hub import InferenceClient
4
 
5
+ HF_TOKEN = os.getenv("HF_TOKEN")
6
+ if not HF_TOKEN:
7
+ raise RuntimeError("HF_TOKEN environment variable not set")
8
+
9
  def respond(message, history):
10
  client = InferenceClient(token=HF_TOKEN, model="Qwen/Qwen3-Next-80B-A3B-Instruct")
11
  messages = [{"role": "system", "content": "You are a helpful assistant."}]