adamelliotfields commited on
Commit
fd26aa4
β€’
1 Parent(s): 8407ae2

Rename app to "Playground"

Browse files
0_🏠_Home.py CHANGED
@@ -3,7 +3,7 @@ import streamlit as st
3
  from lib import config
4
 
5
  st.set_page_config(
6
- page_title=config.title,
7
  page_icon=config.logo,
8
  layout=config.layout,
9
  )
@@ -14,6 +14,7 @@ st.logo(config.logo)
14
  # title
15
  st.html("""
16
  <style>
 
17
  .pro-badge {
18
  display: inline-block;
19
  transform: skew(-12deg);
@@ -36,10 +37,10 @@ st.html("""
36
  }
37
  </style>
38
  <div style="display: flex; align-items: center; gap: 0.75rem">
39
- <h1>API Inference</h1>
40
- <span class="pro-badge">PRO</span>
41
  </div>
42
- <p>Explore popular AI endpoints in one place.</p>
43
  """)
44
 
45
  st.markdown("## Tasks")
@@ -63,5 +64,5 @@ st.markdown("""
63
 
64
  Select a task. Choose a service. Enter your API key (refresh browser to clear).
65
 
66
- I recommend [duplicating this space](https://huggingface.co/spaces/adamelliotfields/api-inference?duplicate=true) **privately** and persisting your keys as secrets. See [`README.md`](https://huggingface.co/spaces/adamelliotfields/api-inference/blob/main/README.md).
67
  """)
 
3
  from lib import config
4
 
5
  st.set_page_config(
6
+ page_title=f"Home - {config.title}",
7
  page_icon=config.logo,
8
  layout=config.layout,
9
  )
 
14
  # title
15
  st.html("""
16
  <style>
17
+ /* https://huggingface.co/subscribe/pro */
18
  .pro-badge {
19
  display: inline-block;
20
  transform: skew(-12deg);
 
37
  }
38
  </style>
39
  <div style="display: flex; align-items: center; gap: 0.75rem">
40
+ <h1>Playground</h1>
41
+ <span class="pro-badge">API</span>
42
  </div>
43
+ <p>Explore popular generative AI endpoints.</p>
44
  """)
45
 
46
  st.markdown("## Tasks")
 
64
 
65
  Select a task. Choose a service. Enter your API key (refresh browser to clear).
66
 
67
+ I recommend [duplicating this space](https://huggingface.co/spaces/adamelliotfields/playground?duplicate=true) **privately** and persisting your keys as secrets. See [`README.md`](https://huggingface.co/spaces/adamelliotfields/playground/blob/main/README.md).
68
  """)
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
  # https://huggingface.co/docs/hub/en/spaces-config-reference
3
- title: API Inference
4
- short_description: Inference on many API endpoints
5
  emoji: ⚑
6
  colorFrom: blue
7
- colorTo: green
8
  sdk: streamlit
9
  sdk_version: 1.37.1
10
  python_version: 3.11.9
@@ -17,8 +17,9 @@ license: apache-2.0
17
  models:
18
  - black-forest-labs/FLUX.1-schnell
19
  - black-forest-labs/FLUX.1-dev
 
20
  ---
21
- # ⚑ API Inference
22
 
23
  [Streamlit](https://streamlit.io) app for running inference on generative AI endpoints.
24
 
@@ -42,8 +43,8 @@ Recommend [uv](https://github.com/astral-sh/uv).
42
 
43
  ```sh
44
  # clone
45
- git clone https://huggingface.co/spaces/adamelliotfields/api-inference.git
46
- cd api-inference
47
 
48
  # install
49
  uv venv
@@ -57,5 +58,5 @@ python 0_🏠_Home.py
57
  ## Development
58
 
59
  ```sh
60
- git remote set-url origin https://adamelliotfields:$HF_TOKEN@huggingface.co/spaces/adamelliotfields/api-inference
61
  ```
 
1
  ---
2
  # https://huggingface.co/docs/hub/en/spaces-config-reference
3
+ title: Playground
4
+ short_description: Explore popular generative AI endpoints
5
  emoji: ⚑
6
  colorFrom: blue
7
+ colorTo: pink
8
  sdk: streamlit
9
  sdk_version: 1.37.1
10
  python_version: 3.11.9
 
17
  models:
18
  - black-forest-labs/FLUX.1-schnell
19
  - black-forest-labs/FLUX.1-dev
20
+ - stabilityai/stable-diffusion-xl-base-1.0
21
  ---
22
+ # ⚑ Playground
23
 
24
  [Streamlit](https://streamlit.io) app for running inference on generative AI endpoints.
25
 
 
43
 
44
  ```sh
45
  # clone
46
+ git clone https://huggingface.co/spaces/adamelliotfields/playground.git
47
+ cd playground
48
 
49
  # install
50
  uv venv
 
58
  ## Development
59
 
60
  ```sh
61
+ git remote set-url origin https://adamelliotfields:$HF_TOKEN@huggingface.co/spaces/adamelliotfields/playground
62
  ```
lib/config.py CHANGED
@@ -142,7 +142,7 @@ _pplx_text_kwargs = {
142
  }
143
 
144
  config = AppConfig(
145
- title="API Inference",
146
  layout="wide",
147
  logo="logo.png",
148
  timeout=60,
 
142
  }
143
 
144
  config = AppConfig(
145
+ title="Playground",
146
  layout="wide",
147
  logo="logo.png",
148
  timeout=60,
pages/1_πŸ’¬_Text_Generation.py CHANGED
@@ -5,7 +5,7 @@ import streamlit as st
5
  from lib import config, txt2txt_generate
6
 
7
  st.set_page_config(
8
- page_title=f"{config.title} | Text Generation",
9
  page_icon=config.logo,
10
  layout=config.layout,
11
  )
 
5
  from lib import config, txt2txt_generate
6
 
7
  st.set_page_config(
8
+ page_title=f"Text Generation - {config.title}",
9
  page_icon=config.logo,
10
  layout=config.layout,
11
  )
pages/2_🎨_Text_to_Image.py CHANGED
@@ -5,7 +5,7 @@ import streamlit as st
5
  from lib import config, txt2img_generate
6
 
7
  st.set_page_config(
8
- page_title=f"{config.title} | Text to Image",
9
  page_icon=config.logo,
10
  layout=config.layout,
11
  )
 
5
  from lib import config, txt2img_generate
6
 
7
  st.set_page_config(
8
+ page_title=f"Text to Image - {config.title}",
9
  page_icon=config.logo,
10
  layout=config.layout,
11
  )