Update app.py
Browse files
app.py
CHANGED
@@ -155,11 +155,11 @@ def main():
|
|
155 |
text = message
|
156 |
|
157 |
if st.checkbox("English Text Generation"):
|
158 |
-
|
159 |
-
|
160 |
|
161 |
def query(payload):
|
162 |
-
response = requests.post(
|
163 |
return response.json()
|
164 |
|
165 |
output = query({
|
|
|
155 |
text = message
|
156 |
|
157 |
if st.checkbox("English Text Generation"):
|
158 |
+
API_URL2 = "https://api-inference.huggingface.co/models/gpt2"
|
159 |
+
headers2 = {"Authorization": "Bearer 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"}
|
160 |
|
161 |
def query(payload):
|
162 |
+
response = requests.post(API_URL2, headers=headers2, json=payload)
|
163 |
return response.json()
|
164 |
|
165 |
output = query({
|