gaspar-avit commited on
Commit
4585239
·
1 Parent(s): b6084ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -183,9 +183,9 @@ def query_generate(text, genres, year):
183
  """
184
  API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
185
  headers = {"Authorization": f"Bearer {st.secrets['hf_token']}"}
186
- text = 'A movie Poster based on the following synopsis: \"' + text + '\". Style: ' + genres + ', year ' + year + \
187
  '. Ignore ' + ''.join(random.choices(string.ascii_letters, k=10))
188
- payload = {"inputs": f"{text}",}
189
 
190
  response = requests.post(API_URL, headers=headers, json=payload)
191
 
 
183
  """
184
  API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
185
  headers = {"Authorization": f"Bearer {st.secrets['hf_token']}"}
186
+ text = 'A movie Poster in portrait mode based on the following synopsis: \"' + text + '\". Style: ' + genres + ', year ' + year + \
187
  '. Ignore ' + ''.join(random.choices(string.ascii_letters, k=10))
188
+ payload = {"inputs": f"{text}", "options": {"use_cache": False},}
189
 
190
  response = requests.post(API_URL, headers=headers, json=payload)
191