artificialguybr commited on
Commit
1b8146c
1 Parent(s): fe5728b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,12 +36,12 @@ def run_lora(prompt, selected_state, progress=gr.Progress(track_tqdm=True)):
36
  selected_lora = loras[selected_lora_index]
37
  api_url = f"https://api-inference.huggingface.co/models/{selected_lora['repo']}"
38
  trigger_word = selected_lora["trigger_word"]
39
- #token = os.getenv("API_TOKEN")
40
  payload = {
41
  "inputs": f"{prompt} {trigger_word}",
42
  "parameters":{"negative_prompt": "bad art, ugly, watermark, deformed"},
43
  }
44
- #headers = {"Authorization": f"Bearer {token}"}
45
 
46
  # Add a print statement to display the API request
47
  print(f"API Request: {api_url}")
 
36
  selected_lora = loras[selected_lora_index]
37
  api_url = f"https://api-inference.huggingface.co/models/{selected_lora['repo']}"
38
  trigger_word = selected_lora["trigger_word"]
39
+ token = os.getenv("API_TOKEN")
40
  payload = {
41
  "inputs": f"{prompt} {trigger_word}",
42
  "parameters":{"negative_prompt": "bad art, ugly, watermark, deformed"},
43
  }
44
+ headers = {"Authorization": f"Bearer {token}"}
45
 
46
  # Add a print statement to display the API request
47
  print(f"API Request: {api_url}")