Spaces:
Sleeping
Sleeping
π Deploy to Hugging Face Spaces (removed large files)
Browse files- README.md +35 -0
- deploy_to_spaces.py +53 -1
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Cert Study App
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.0.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Cert Study App π
|
| 14 |
+
|
| 15 |
+
AI-powered certification exam study application with intelligent question generation and adaptive learning.
|
| 16 |
+
|
| 17 |
+
## Features
|
| 18 |
+
|
| 19 |
+
- π PDF parsing with OCR support
|
| 20 |
+
- π€ AI-powered question generation
|
| 21 |
+
- π Study progress tracking
|
| 22 |
+
- π― Adaptive learning system
|
| 23 |
+
- π Semantic search for questions
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
+
|
| 27 |
+
Upload your study materials and start practicing with AI-generated questions tailored to your learning needs.
|
| 28 |
+
|
| 29 |
+
## Tech Stack
|
| 30 |
+
|
| 31 |
+
- Flask
|
| 32 |
+
- LangChain
|
| 33 |
+
- ChromaDB
|
| 34 |
+
- PaddleOCR
|
| 35 |
+
- Hugging Face Transformers
|
deploy_to_spaces.py
CHANGED
|
@@ -62,7 +62,7 @@ hf_token = get_hf_token()
|
|
| 62 |
AUTH_REPO_URL = f"https://{HF_USERNAME}:{hf_token}@huggingface.co/spaces/{HF_USERNAME}/{SPACE_NAME}"
|
| 63 |
|
| 64 |
# ======================================================
|
| 65 |
-
# π§° 3οΈβ£ νμ νμΌ μμ± (requirements.txt, runtime.txt, .env)
|
| 66 |
# ======================================================
|
| 67 |
print("\nπ¦ νμ νμΌ μμ± μ€...")
|
| 68 |
|
|
@@ -89,6 +89,43 @@ paddlepaddle-gpu
|
|
| 89 |
|
| 90 |
runtime = "python-3.10\n"
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
env_template = """# λ‘컬 μ€νμ© νκ²½ λ³μ
|
| 93 |
# β οΈ μ΄ νμΌμ μ λ Gitμ μ¬λ¦¬μ§ λ§μΈμ!
|
| 94 |
|
|
@@ -105,6 +142,21 @@ print("β
requirements.txt μμ± μλ£")
|
|
| 105 |
Path("runtime.txt").write_text(runtime, encoding="utf-8")
|
| 106 |
print("β
runtime.txt μμ± μλ£")
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
# π .envκ° μ΄λ―Έ μμΌλ©΄ μ μ§, μμ λλ§ ν
νλ¦Ώ μμ±
|
| 109 |
env_path = Path(".env")
|
| 110 |
if not env_path.exists():
|
|
|
|
| 62 |
AUTH_REPO_URL = f"https://{HF_USERNAME}:{hf_token}@huggingface.co/spaces/{HF_USERNAME}/{SPACE_NAME}"
|
| 63 |
|
| 64 |
# ======================================================
|
| 65 |
+
# π§° 3οΈβ£ νμ νμΌ μμ± (requirements.txt, runtime.txt, README.md, .env)
|
| 66 |
# ======================================================
|
| 67 |
print("\nπ¦ νμ νμΌ μμ± μ€...")
|
| 68 |
|
|
|
|
| 89 |
|
| 90 |
runtime = "python-3.10\n"
|
| 91 |
|
| 92 |
+
readme = """---
|
| 93 |
+
title: Cert Study App
|
| 94 |
+
emoji: π
|
| 95 |
+
colorFrom: blue
|
| 96 |
+
colorTo: green
|
| 97 |
+
sdk: gradio
|
| 98 |
+
sdk_version: "4.0.0"
|
| 99 |
+
app_file: app.py
|
| 100 |
+
pinned: false
|
| 101 |
+
license: apache-2.0
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
# Cert Study App π
|
| 105 |
+
|
| 106 |
+
AI-powered certification exam study application with intelligent question generation and adaptive learning.
|
| 107 |
+
|
| 108 |
+
## Features
|
| 109 |
+
|
| 110 |
+
- π PDF parsing with OCR support
|
| 111 |
+
- π€ AI-powered question generation
|
| 112 |
+
- π Study progress tracking
|
| 113 |
+
- π― Adaptive learning system
|
| 114 |
+
- π Semantic search for questions
|
| 115 |
+
|
| 116 |
+
## Usage
|
| 117 |
+
|
| 118 |
+
Upload your study materials and start practicing with AI-generated questions tailored to your learning needs.
|
| 119 |
+
|
| 120 |
+
## Tech Stack
|
| 121 |
+
|
| 122 |
+
- Flask
|
| 123 |
+
- LangChain
|
| 124 |
+
- ChromaDB
|
| 125 |
+
- PaddleOCR
|
| 126 |
+
- Hugging Face Transformers
|
| 127 |
+
"""
|
| 128 |
+
|
| 129 |
env_template = """# λ‘컬 μ€νμ© νκ²½ λ³μ
|
| 130 |
# β οΈ μ΄ νμΌμ μ λ Gitμ μ¬λ¦¬μ§ λ§μΈμ!
|
| 131 |
|
|
|
|
| 142 |
Path("runtime.txt").write_text(runtime, encoding="utf-8")
|
| 143 |
print("β
runtime.txt μμ± μλ£")
|
| 144 |
|
| 145 |
+
# README.md μμ±
|
| 146 |
+
readme_path = Path("README.md")
|
| 147 |
+
if not readme_path.exists():
|
| 148 |
+
readme_path.write_text(readme, encoding="utf-8")
|
| 149 |
+
print("β
README.md μμ± μλ£")
|
| 150 |
+
else:
|
| 151 |
+
# κΈ°μ‘΄ READMEκ° μμΌλ©΄ frontmatter νμΈ
|
| 152 |
+
content = readme_path.read_text(encoding="utf-8")
|
| 153 |
+
if not content.startswith("---"):
|
| 154 |
+
# frontmatterκ° μμΌλ©΄ μΆκ°
|
| 155 |
+
readme_path.write_text(readme + "\n\n" + content, encoding="utf-8")
|
| 156 |
+
print("β
README.mdμ Hugging Face μ€μ μΆκ°")
|
| 157 |
+
else:
|
| 158 |
+
print("βΉοΈ README.mdκ° μ΄λ―Έ μ‘΄μ¬ν©λλ€ (μ μ§)")
|
| 159 |
+
|
| 160 |
# π .envκ° μ΄λ―Έ μμΌλ©΄ μ μ§, μμ λλ§ ν
νλ¦Ώ μμ±
|
| 161 |
env_path = Path(".env")
|
| 162 |
if not env_path.exists():
|