cahya commited on
Commit
5329452
1 Parent(s): 88b054e

add a token

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,8 @@ from prompts import PROMPT_LIST
5
  import streamlit as st
6
  import random
7
 
8
- headers = {}
 
9
  MODELS = {
10
  "GPT-2 Small": {
11
  "url": "https://api-inference.huggingface.co/models/flax-community/gpt2-small-indonesian"
@@ -15,7 +16,6 @@ MODELS = {
15
  },
16
  }
17
 
18
- token = st.secrets["test_token"]
19
 
20
  def query(payload, model_name):
21
  data = json.dumps(payload)
 
5
  import streamlit as st
6
  import random
7
 
8
+ token = st.secrets["flax_community_token"]
9
+ headers = {"Authorization": f"Bearer {token}"}
10
  MODELS = {
11
  "GPT-2 Small": {
12
  "url": "https://api-inference.huggingface.co/models/flax-community/gpt2-small-indonesian"
 
16
  },
17
  }
18
 
 
19
 
20
  def query(payload, model_name):
21
  data = json.dumps(payload)