https://github.com/recursivezero/tz-fabric
fabric AI tools for textile industry
https://github.com/recursivezero/tz-fabric
fabric fabric-ai india python textile threadzip tz-fabric
Last synced: 4 months ago
JSON representation
fabric AI tools for textile industry
- Host: GitHub
- URL: https://github.com/recursivezero/tz-fabric
- Owner: recursivezero
- License: mit
- Created: 2025-07-23T15:55:13.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-02-05T14:24:15.000Z (4 months ago)
- Last Synced: 2026-02-06T01:01:23.260Z (4 months ago)
- Topics: fabric, fabric-ai, india, python, textile, threadzip, tz-fabric
- Language: TypeScript
- Homepage: https://pro.threadzip.com
- Size: 107 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
- Governance: .github/GOVERNANCE.md
Awesome Lists containing this project
README
# ๐งต Fabric Analyzer
```text
Fabric Analyzer is an AI-powered web application that analyzes fabric
images to provide insightful textual descriptions.
```
๐ Features
```text
๐ผ Upload your own fabric images or use curated sample images
๐ Choose between **Short** or **Long** analysis
๐ค Powered by Google Gemini Vision API for detailed AI responses
๐ง Response caching for fast navigation (Prev/Next)
โ
Validates whether uploaded image is a proper fabric image
๐งญ Drawer and navigation UI for enhanced experience
๐ค Upload and record of fabric images and related audios
๐ Search Similar images through a query
๐ค An agentic chatbot for fabric queries and task
```
๐ ๏ธ Tech Stack of Frontend
```text
React
Typescript
css
Prerequisites to use react
->Node.js(v16 or later)
->npm(comes with the node)
```
๐ ๏ธ Tech Stack of Backend
```text
Fastapi
google-generative(gemini-api)
Langchain agents
MCP
Groq
Pillow
base64
```
๐ ๏ธ Tech Stack of Databases
```text
-> MongoDB
```
๐ Folder Structure of Frontend
```text
frontend/
โโโ public/
โ โโโ 20250312_224758__10_45_28_PM.jpeg
โ โโโ 20250323_093907__10_24_31_PM.jpeg
โ โโโ 20250323_094209__10_22_53_PM.jpeg
โ โโโ Gemini_Generated_Image_9m5wh59m5wh59m5w.png
โ โโโ index.html
โ โโโ manifest.json
โ โโโ robots.txt
โ
โโโ src/
โ โโโ assets/
โ โโโ components/
โ โโโ hooks/
โ โโโ Pages/
โ โโโ Services/
โ โโโ utils/
โ โโโ services/
โ
โโโ App.css
โโโ App.js
โโโ App.test.js
โโโ index.css
โโโ index.js
โโโ logo.svg
โโโ reportWebVitals.js
โโโ setupTests.js
โ
```
๐ Folder Structure of Backend
```text
backend/
โโโ main.py
โโโ cli.py
โโโ LICENSE-PYTHON
โโโ .env
โโโ agent/
โโโ core/
โโโ routes/
โโโ services/
โโโ static/
โโโ templates/
โโโ tools/
โโโ utils/
โโโ pyproject.toml/
โโโ README.md/
```
๐ API Flow
```text
POST /api/validate-image โ Validates if uploaded image is a fabric
POST /api/analyze-image โ Runs Gemini analysis (short or long)
POST /api/regenerate โ Regenerates response set for same image + mode
POST /api/chat - chatbot
GET /api/assets/images/{filename} - for getting the images
GET /api/assets/audios/{filename} - for getting the audios
GET /api/media/content - for listing the uploaded media
POST /api/search - for searching the similar images
POST /api/submit - for uploading the media
POST /api/uploads/tmp_media - for storing the media in chat
```
## How to start
Clone the repo
```sh
git clone https://github.com/recursivezero/tz-fabric.git
cd tz-fabric
```
๐๏ธ Backend
```sh
cd backend
curl -sSL https://install.python-poetry.org | python3 -
poetry install - to install all the dependencies
poetry run dev
```
๐๏ธ Frontend
```sh
cd frontend
npm install -> to download the node modules
npm install axios -> for backend integration
npm install react-icons // if react-icons is not installed
npm run dev
```
## Sample .env
backend/.env
```text
PORT=8000
GEMINI_API_KEY=""
GRQ_API_KEY=""
MONGODB_URI="mongodb://localhost:27017"
```
frontend/.env
```text
VITE_API_URL="http://localhost:8000"
```
๐ผ๏ธ Screenshots
### Homepage

---
### Analysis Page


---
### Upload Page


---
### List Page

---
### Search Page



---
### Chat Page


## ๐ License
This project is licensed under the terms of the [MIT License](https://github.com/recursivezero/tz-fabric/blob/main/LICENSE).