SerotoninRonin commited on
Commit
fb894bf
·
verified ·
1 Parent(s): 7e947e2

Retrieving HF_TOKEN via os

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import json
2
  from typing import List, Any, Dict, Tuple, Union
3
  import gradio as gr
@@ -40,7 +41,7 @@ def generate_quiz(
40
  if q_type == "Multiple Choice":
41
  user_msg += "Each question should have 4 answer choices, unlabeled, and one correct answer."
42
 
43
- client = InferenceClient(provider="together")
44
  response = client.chat.completions.create(
45
  model="openai/gpt-oss-120b",
46
  messages=[
 
1
+ import os
2
  import json
3
  from typing import List, Any, Dict, Tuple, Union
4
  import gradio as gr
 
41
  if q_type == "Multiple Choice":
42
  user_msg += "Each question should have 4 answer choices, unlabeled, and one correct answer."
43
 
44
+ client = InferenceClient(provider="together", api_key=os.getenv("HF_TOKEN"))
45
  response = client.chat.completions.create(
46
  model="openai/gpt-oss-120b",
47
  messages=[