File size: 1,381 Bytes
31ebc8b
 
 
 
 
 
 
1ae907c
31ebc8b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
license: mit
title: Demo
sdk: gradio
emoji: πŸš€
colorFrom: purple
colorTo: yellow
sdk_version: 5.22.0
---
# Product Categorization App - One-Click Solution

This is a turnkey solution for categorizing products based on their similarity to ingredients using Voyage AI.

## Quick Start

1. Place your `ingredient_embeddings_voyageai.pkl` file in the same folder as this README
2. Run the application:

   ```bash
   bash run_app.sh
   ```

3. That's it! A browser window will open with the app, and a public URL will be created for sharing

## What You Can Do

- **Text Input:** Enter product names one per line
- **File Upload:** Upload a JSON file with product data
- Adjust the number of categories and Similarity Threshold
- View the categorization results with confidence scores

## Hosting on Hugging Face Spaces

For permanent, free hosting on Gradio:

1. Create a free account on [Hugging Face](https://huggingface.co/)
2. Go to [Hugging Face Spaces](https://huggingface.co/spaces)
3. Click "Create a Space"
4. Select "Gradio" as the SDK
5. Upload all files (including your embeddings file) to the space
6. Your app will be automatically deployed!

## Files Included

- `app.py`: The main application code
- `requirements.txt`: Required Python packages
- `run_app.sh`: One-click deployment script

## Requirements

- Python 3.7+
- Internet connection (for Voyage AI API)