Don B commited on
Commit
976207b
·
1 Parent(s): 655f4b4

update size to accept nulls

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ def fetch_images(postID):
10
  response.raise_for_status() # This will raise an exception for HTTP errors
11
  data = response.json()
12
  items = data["items"]
13
- table_data = [[item["id"], item["meta"]["prompt"], item["meta"].get("negativePrompt", "N/A"), item["meta"]["Model"],item["meta"]["sampler"], item["meta"]["steps"], item["meta"]["cfgScale"], item["meta"]["Size"], item["url"]] for item in items]
14
  return table_data
15
  except requests.RequestException as e:
16
  st.error(f"Failed to fetch images: {e}")
 
10
  response.raise_for_status() # This will raise an exception for HTTP errors
11
  data = response.json()
12
  items = data["items"]
13
+ table_data = [[item["id"], item["meta"]["prompt"], item["meta"].get("negativePrompt", "N/A"), item["meta"]["Model"],item["meta"]["sampler"], item["meta"]["steps"], item["meta"]["cfgScale"], item["meta"].get("Size", "missing"), item["url"]] for item in items]
14
  return table_data
15
  except requests.RequestException as e:
16
  st.error(f"Failed to fetch images: {e}")