Soumen commited on
Commit
b808107
1 Parent(s): 27f6f15

Update app.py

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