Spaces:
Sleeping
Sleeping
iris-s-coon
commited on
Commit
•
d395f06
1
Parent(s):
0eaf3fa
📖 [docs] 英語READMEの更新
Browse files- docs/README.en.md +41 -8
docs/README.en.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
-
title:
|
4 |
sdk: streamlit
|
5 |
emoji: 🐨
|
6 |
colorFrom: blue
|
@@ -47,7 +47,7 @@ Pic-to-Header is a Streamlit application that allows you to easily generate and
|
|
47 |
|
48 |
### Method 1: Installation from PyPI
|
49 |
|
50 |
-
Pic-to-Header is available on PyPI.
|
51 |
|
52 |
```bash
|
53 |
pip install pic-to-header
|
@@ -67,12 +67,12 @@ pip install pic-to-header
|
|
67 |
|
68 |
### Streamlit Web Application
|
69 |
|
70 |
-
1.
|
71 |
```bash
|
72 |
-
streamlit run
|
73 |
```
|
74 |
2. Access the URL displayed in your browser.
|
75 |
-
3. Upload
|
76 |
4. Click the "Generate Header Image" button.
|
77 |
5. Preview and download the generated header image as needed.
|
78 |
|
@@ -91,6 +91,39 @@ Example:
|
|
91 |
pic-to-header assets/sample.png assets/mask.png output_image.png
|
92 |
```
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
## 📦 Installation Instructions
|
96 |
|
@@ -101,9 +134,9 @@ See the "Usage" section above.
|
|
101 |
|
102 |
- Implemented a command-line interface (CLI) for image processing from the command line.
|
103 |
- Added a README page and release notes page to the Streamlit app.
|
104 |
-
- Improved documentation,
|
105 |
-
- Changed the CLI entry point from `pic_to_header.app:main` to `
|
106 |
-
-
|
107 |
|
108 |
|
109 |
## 📄 License
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
title: pic-to-header
|
4 |
sdk: streamlit
|
5 |
emoji: 🐨
|
6 |
colorFrom: blue
|
|
|
47 |
|
48 |
### Method 1: Installation from PyPI
|
49 |
|
50 |
+
Pic-to-Header is available on PyPI. You can install it using the following command:
|
51 |
|
52 |
```bash
|
53 |
pip install pic-to-header
|
|
|
67 |
|
68 |
### Streamlit Web Application
|
69 |
|
70 |
+
1. Start the Streamlit application:
|
71 |
```bash
|
72 |
+
streamlit run pic_to_header/app.py
|
73 |
```
|
74 |
2. Access the URL displayed in your browser.
|
75 |
+
3. Upload your input and mask images.
|
76 |
4. Click the "Generate Header Image" button.
|
77 |
5. Preview and download the generated header image as needed.
|
78 |
|
|
|
91 |
pic-to-header assets/sample.png assets/mask.png output_image.png
|
92 |
```
|
93 |
|
94 |
+
### Using the Python Script
|
95 |
+
|
96 |
+
The `pic-to-header` package can also be used directly within a Python script. Here's an example:
|
97 |
+
|
98 |
+
```python
|
99 |
+
from pic_to_header.core import process_header_image
|
100 |
+
|
101 |
+
# Specify the paths to the input image, mask image, and output image
|
102 |
+
input_image_path = "path/to/input_image.png"
|
103 |
+
mask_image_path = "path/to/mask_image.png"
|
104 |
+
output_image_path = "path/to/output_image.png"
|
105 |
+
|
106 |
+
# Generate the header image
|
107 |
+
result = process_header_image(input_image_path, mask_image_path, output_image_path)
|
108 |
+
|
109 |
+
print(f"Header image generated: {result}")
|
110 |
+
```
|
111 |
+
|
112 |
+
This script works as follows:
|
113 |
+
|
114 |
+
1. Imports the `process_header_image` function from the `pic_to_header.core` module.
|
115 |
+
2. Specifies the paths to the input image, mask image, and output image.
|
116 |
+
3. Calls the `process_header_image` function to generate the header image.
|
117 |
+
4. Displays the path to the generated image.
|
118 |
+
|
119 |
+
Running this script will generate the header image at the specified output path.
|
120 |
+
|
121 |
+
## 💻 Development
|
122 |
+
|
123 |
+
- `pic_to_header/core.py`: Contains the core image processing functionality.
|
124 |
+
- `pic_to_header/app.py`: Provides the web interface using Streamlit.
|
125 |
+
- `pic_to_header/cli.py`: Provides the command-line interface.
|
126 |
+
|
127 |
|
128 |
## 📦 Installation Instructions
|
129 |
|
|
|
134 |
|
135 |
- Implemented a command-line interface (CLI) for image processing from the command line.
|
136 |
- Added a README page and release notes page to the Streamlit app.
|
137 |
+
- Improved documentation, adding instructions for installation from PyPI and CLI usage.
|
138 |
+
- Changed the CLI entry point from `pic_to_header.app:main` to `pic_to_header.cli:main`.
|
139 |
+
- Version number updated from 0.1.0 to 0.1.1.
|
140 |
|
141 |
|
142 |
## 📄 License
|