Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,3 +12,48 @@ short_description: Architecture Feedback Generator
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 15 |
+
|
| 16 |
+
# Architecture Feedback Generator (Classification & Prompt Only)
|
| 17 |
+
|
| 18 |
+
This Gradio application performs image and text classification related to architectural design and generates a structured prompt based on the classification results. This version focuses on the classification and prompt generation steps, excluding the interaction with a Large Language Model for generating feedback.
|
| 19 |
+
|
| 20 |
+
## Functionality
|
| 21 |
+
|
| 22 |
+
The application takes two inputs:
|
| 23 |
+
1. **Architectural Image**: Upload an image representing an architectural design.
|
| 24 |
+
2. **Text Description or Question**: Provide a text input related to the architectural design or a question about it.
|
| 25 |
+
|
| 26 |
+
Based on these inputs, the application performs:
|
| 27 |
+
* **Image Classification**: Classifies the image into different architectural design stages (e.g., brainstorm, design iteration, final review).
|
| 28 |
+
* **Text Classification**: Determines if the text input contains abstract architectural concepts (High Concept: Yes/No) and provides a confidence score.
|
| 29 |
+
|
| 30 |
+
The results of both classifications are then used to generate a structured prompt, intended for use with a Large Language Model (LLM).
|
| 31 |
+
|
| 32 |
+
## How to Use
|
| 33 |
+
|
| 34 |
+
1. Upload an architectural image using the image input box.
|
| 35 |
+
2. Enter your text description or question in the text input box.
|
| 36 |
+
3. Click the "Perform Classification & Generate Prompt" button.
|
| 37 |
+
4. The application will display the Image Classification Results, Text Classification Results, and the Generated Prompt for LLM.
|
| 38 |
+
|
| 39 |
+
## Models Used
|
| 40 |
+
|
| 41 |
+
* **Image Classification Model**: A CNN model hosted on Hugging Face Hub (`keerthikoganti/architecture-design-stages-compact-cnn`).
|
| 42 |
+
* **Text Embedding Model**: `sentence-transformers/all-MiniLM-L6-v2` from Hugging Face.
|
| 43 |
+
* **Text Classification Model**: An AutoGluon TabularPredictor model hosted on Hugging Face Hub (`kaitongg/my-autogluon-model`), trained on text embeddings.
|
| 44 |
+
|
| 45 |
+
## Deployment
|
| 46 |
+
|
| 47 |
+
This application is designed to be deployed on Hugging Face Spaces.
|
| 48 |
+
|
| 49 |
+
* **`app.py`**: Contains the complete Gradio application code, including model loading, function definitions, and the Gradio interface.
|
| 50 |
+
* **`requirements.txt`**: Lists the necessary Python packages to install for the Space environment.
|
| 51 |
+
* **Models**: The models are loaded directly from Hugging Face Hub within the `app.py` file.
|
| 52 |
+
|
| 53 |
+
To deploy this application:
|
| 54 |
+
1. Create a new Hugging Face Space.
|
| 55 |
+
2. Choose the "Gradio" application template.
|
| 56 |
+
3. Upload the generated `app.py` and `requirements.txt` files to your Space.
|
| 57 |
+
4. Ensure any necessary secrets (like `HF_TOKEN_WRITE` if your text predictor repo is private) are added to your Space settings as environment variables.
|
| 58 |
+
|
| 59 |
+
---
|