Spaces:
Runtime error
Runtime error
test a token
Browse files
app.py
CHANGED
@@ -15,6 +15,7 @@ MODELS = {
|
|
15 |
},
|
16 |
}
|
17 |
|
|
|
18 |
|
19 |
def query(payload, model_name):
|
20 |
data = json.dumps(payload)
|
@@ -92,10 +93,10 @@ st.markdown(
|
|
92 |
model_name = st.selectbox('Model',(['GPT-2 Small', 'GPT-2 Medium']))
|
93 |
|
94 |
ALL_PROMPTS = list(PROMPT_LIST.keys())+["Custom"]
|
95 |
-
prompt = st.selectbox('Please choose
|
96 |
|
97 |
if prompt == "Custom":
|
98 |
-
prompt_box = "Enter your text here"
|
99 |
else:
|
100 |
prompt_box = random.choice(PROMPT_LIST[prompt])
|
101 |
|
|
|
15 |
},
|
16 |
}
|
17 |
|
18 |
+
token = st.secrets("test_token")
|
19 |
|
20 |
def query(payload, model_name):
|
21 |
data = json.dumps(payload)
|
|
|
93 |
model_name = st.selectbox('Model',(['GPT-2 Small', 'GPT-2 Medium']))
|
94 |
|
95 |
ALL_PROMPTS = list(PROMPT_LIST.keys())+["Custom"]
|
96 |
+
prompt = st.selectbox('Please choose a predefined prompt or create your custom text.', ALL_PROMPTS, index=len(ALL_PROMPTS)-1)
|
97 |
|
98 |
if prompt == "Custom":
|
99 |
+
prompt_box = "Enter your text here" + f": #{token}#"
|
100 |
else:
|
101 |
prompt_box = random.choice(PROMPT_LIST[prompt])
|
102 |
|