NyashaK commited on
Commit
2971515
·
1 Parent(s): 4b7155f

Publish app on gradio

Browse files
Files changed (1) hide show
  1. README.md +25 -11
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # Zim Docs OCR-to-JSON Extractor
2
 
3
  ## Overview
@@ -35,7 +46,7 @@ If you wish to run the application on your local machine:
35
  ```bash
36
  python app.py
37
  ```
38
- Replace `app.py` with the actual name of your Python file. It will typically be available at `http://127.0.0.1:7860`.
39
 
40
  ## How to Use
41
 
@@ -50,15 +61,18 @@ If you wish to run the application on your local machine:
50
  * Switch to the "Extracted Data (JSON)" tab to view the structured information extracted by the AI model.
51
  * If any errors occur during processing (e.g., unsupported file type, API issue), an error message will be displayed in the JSON output area.
52
 
53
- ---
54
- title: OCRDocs2JSON
55
- emoji: 🧾
56
- colorFrom: indigo
57
- colorTo: blue
58
- sdk: gradio
59
- sdk_version: "4.26.0"
60
- app_file: app.py
61
- pinned: false
62
- ---
63
 
 
 
 
 
 
 
 
 
 
 
 
64
 
 
 
1
+ ---
2
+ title: Zim Docs OCR-to-JSON Extractor
3
+ emoji: 📄
4
+ colorFrom: purple
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: "3.40.1" # Replace with your actual Gradio version if known, or a recent one
8
+ app_file: app.py # Assuming your main Python file is app.py
9
+ pinned: false
10
+ ---
11
+
12
  # Zim Docs OCR-to-JSON Extractor
13
 
14
  ## Overview
 
46
  ```bash
47
  python app.py
48
  ```
49
+ Your Python file should be named `app.py` (or update this command if it's different). It will typically be available at `http://127.0.0.1:7860`.
50
 
51
  ## How to Use
52
 
 
61
  * Switch to the "Extracted Data (JSON)" tab to view the structured information extracted by the AI model.
62
  * If any errors occur during processing (e.g., unsupported file type, API issue), an error message will be displayed in the JSON output area.
63
 
64
+ ## Troubleshooting
 
 
 
 
 
 
 
 
 
65
 
66
+ Here are some common issues you might encounter and how to resolve them:
67
+
68
+ * **API Key Issues:** Ensure your `API_KEY` is correctly set as a Secret on Hugging Face Spaces (or as an environment variable for local testing). Also, verify that your key is valid and has sufficient credits/access for the chosen model.
69
+ * **Dependency Errors:** If you're on Hugging Face, double-check your `requirements.txt` file. For local use, ensure all libraries are installed in your environment.
70
+ * **File Conversion Failures:** For PDFs, `PyMuPDF (fitz)` needs to be available. Corrupted PDF files might also cause issues with conversion.
71
+ * **Model Output/JSON Errors:**
72
+ * If the model doesn't return valid JSON, the application will attempt to report an error.
73
+ * The quality of the extracted JSON heavily depends on the clarity of your input document, the capabilities of the chosen vision model, and the effectiveness of the prompt used to guide the AI.
74
+ * **Network Errors:** You'll need a stable internet connection for the application to make external API calls. These can fail due to network issues or timeouts. If you're on Hugging Face, this might relate to the Space's network access or API endpoint reachability.
75
+
76
+ ---
77
 
78
+ This README provides you with a concise guide to understanding, setting up, and using the Zim Docs OCR-to-JSON Extractor.