diff --git a/README.md b/README.md index 94c8ee9..a4e3a4e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ From there, it's easy to implement popular design patterns like ([Multi-](https: | [Code Generator](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-code-generator) | ★☆☆ *Beginner* | Generate test cases, implement solutions, and iteratively improve code | | [MCP](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-mcp) | ★☆☆ *Beginner* | Agent using Model Context Protocol for numerical operations | | [A2A](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-a2a) | ★☆☆ *Beginner* | Agent wrapped with A2A protocol for inter-agent communication | -| [Streamlit HITL](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-streamlit-hitl) | ★☆☆ *Beginner* | Streamlit app for human-in-the-loop review | +| [Streamlit HITL](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-streamlit-hitl) | ★☆☆ *Beginner* | Streamlit app for human-in-the-loop image generation | | [FastAPI HITL](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-fastapi-hitl) | ★☆☆ *Beginner* | FastAPI app for async human review loop with SSE | | [Voice Chat](https://github.com/The-Pocket/PocketFlow/tree/main/cookbook/pocketflow-voice-chat) | ★☆☆ *Beginner* | An interactive voice chat application with VAD, STT, LLM, and TTS. | diff --git a/cookbook/pocketflow-streamlit-hitl/README.md b/cookbook/pocketflow-streamlit-hitl/README.md index 52d76de..3af3273 100644 --- a/cookbook/pocketflow-streamlit-hitl/README.md +++ b/cookbook/pocketflow-streamlit-hitl/README.md @@ -2,6 +2,12 @@ Human-in-the-Loop (HITL) image generation application using PocketFlow and Streamlit. Enter text prompts, generate images with OpenAI, and approve/regenerate results. +

+ +

+ ## Features - **Image Generation:** Uses OpenAI's `gpt-image-1` model to generate images from text prompts diff --git a/cookbook/pocketflow-streamlit-hitl/assets/banner.png b/cookbook/pocketflow-streamlit-hitl/assets/banner.png new file mode 100644 index 0000000..8217686 Binary files /dev/null and b/cookbook/pocketflow-streamlit-hitl/assets/banner.png differ diff --git a/cookbook/pocketflow-streamlit-hitl/utils/process_task.py b/cookbook/pocketflow-streamlit-hitl/utils/process_task.py deleted file mode 100644 index 1cc13b0..0000000 --- a/cookbook/pocketflow-streamlit-hitl/utils/process_task.py +++ /dev/null @@ -1,24 +0,0 @@ -import time - -def process_task(task_input: str) -> str: - """ - Simulates processing the input, potentially calling an LLM. - Replace this with your actual task logic. - """ - print(f"Processing task: {task_input[:50]}...") - - result = f"Dummy rephrased text for the following input: {task_input}" - - # Simulate some work - time.sleep(2) - return result - -if __name__ == "__main__": - test_input = "This is a test input for the processing task." - print(f"Input: {test_input}") - output = process_task(test_input) - print(f"Output: {output}") - -# We don't need a separate utils/call_llm.py for this minimal example, -# but you would add it here if ProcessNode used an LLM. -