Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,57 +1,8 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
- **Gradio Interface**: Web interface for testing and manual uploads
|
| 10 |
-
- **API Endpoint**: REST API for integration with the Electron app
|
| 11 |
-
|
| 12 |
-
## Setup on Hugging Face Spaces
|
| 13 |
-
|
| 14 |
-
1. Create a new Space on Hugging Face
|
| 15 |
-
2. Upload these files to your Space
|
| 16 |
-
3. Set the following secrets in your Space settings:
|
| 17 |
-
- `OPENAI_API_KEY`: Your OpenAI API key
|
| 18 |
-
|
| 19 |
-
## Local Development
|
| 20 |
-
|
| 21 |
-
1. Install dependencies:
|
| 22 |
-
```bash
|
| 23 |
-
pip install -r requirements.txt
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
2. Set environment variable:
|
| 27 |
-
```bash
|
| 28 |
-
export OPENAI_API_KEY="your-openai-api-key"
|
| 29 |
-
```
|
| 30 |
-
|
| 31 |
-
3. Run the app:
|
| 32 |
-
```bash
|
| 33 |
-
python app.py
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
## API Usage
|
| 37 |
-
|
| 38 |
-
The Electron app will send POST requests to `/api/process` with the following format:
|
| 39 |
-
|
| 40 |
-
```json
|
| 41 |
-
{
|
| 42 |
-
"image_data": "base64-encoded-image-string"
|
| 43 |
-
}
|
| 44 |
-
```
|
| 45 |
-
|
| 46 |
-
Response format:
|
| 47 |
-
```json
|
| 48 |
-
{
|
| 49 |
-
"extracted_text": "Question text extracted from image",
|
| 50 |
-
"answer": "AI-generated answer",
|
| 51 |
-
"success": true
|
| 52 |
-
}
|
| 53 |
-
```
|
| 54 |
-
|
| 55 |
-
## Educational Use Only
|
| 56 |
-
|
| 57 |
-
This tool is designed for educational purposes to help students understand concepts and learn from examples. Please use responsibly and in accordance with your institution's academic integrity policies.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
title: cheating
|
| 4 |
+
sdk: gradio
|
| 5 |
+
emoji: 🏃
|
| 6 |
+
colorFrom: red
|
| 7 |
+
colorTo: red
|
| 8 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|