Don B
commited on
Commit
·
b82a8b0
1
Parent(s):
d0e74d7
adding diversity images
Browse files
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"]
|
14 |
return table_data
|
15 |
except requests.RequestException as e:
|
16 |
st.error(f"Failed to fetch images: {e}")
|
@@ -36,9 +36,10 @@ def main():
|
|
36 |
st.markdown("""
|
37 |
Created to retrieve prompt info for posts created to showcase a model.
|
38 |
|
39 |
-
Sample Stable Diffusion
|
40 |
-
- post id 1496616 for [DreamShaper](https://civitai.com/posts/1496616)
|
41 |
- post id 1515491 for [Juggernaut Lightning](https://civitai.com/posts/1515491)
|
|
|
42 |
""")
|
43 |
|
44 |
postID = st.text_input('Enter Post ID:', '')
|
|
|
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"]["sampler"], item["meta"]["steps"], item["meta"]["cfgScale"], 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}")
|
|
|
36 |
st.markdown("""
|
37 |
Created to retrieve prompt info for posts created to showcase a model.
|
38 |
|
39 |
+
Sample Stable Diffusion model posts - as of 2024-02-29
|
40 |
+
- post id 1496616 for [DreamShaper Lightning](https://civitai.com/posts/1496616)
|
41 |
- post id 1515491 for [Juggernaut Lightning](https://civitai.com/posts/1515491)
|
42 |
+
- post id 1576676 for [Stable Cascade](https://civitai.com/posts/1576676) - I was impressed with the diversity and inclusivity of the prompts / images
|
43 |
""")
|
44 |
|
45 |
postID = st.text_input('Enter Post ID:', '')
|