ancienbest commited on
Commit
54a4133
·
verified ·
1 Parent(s): dc33676

Deploy OpenStudy Gradio Space

Browse files
Files changed (5) hide show
  1. .gitignore +8 -0
  2. GRADIO_REQUIREMENT.md +27 -0
  3. README.md +39 -6
  4. app.py +0 -0
  5. requirements.txt +7 -0
.gitignore ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+ *.pyc
3
+ .DS_Store
4
+ .venv/
5
+ venv/
6
+ .env
7
+ *.egg-info/
8
+ .gstack/
GRADIO_REQUIREMENT.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gradio Requirement
2
+
3
+ OpenStudy must be built with Gradio.
4
+
5
+ All user-facing application features must run through a Gradio interface so the project works directly on Hugging Face Spaces with the Gradio SDK.
6
+
7
+ ## Required Implementation
8
+
9
+ - The main app entry point must be `app.py`.
10
+ - The Hugging Face Space metadata must use `sdk: gradio`.
11
+ - Dependencies must be listed in `requirements.txt`.
12
+ - Search, upload, project review, tables, plots, downloads, and reports must be exposed through Gradio components.
13
+ - The app should launch with `demo.launch()` or an equivalent Gradio launch wrapper.
14
+
15
+ ## Not Allowed As Replacements
16
+
17
+ - Do not replace the Gradio app with Streamlit, Flask, Django, FastAPI-only pages, React, Next.js, or another frontend framework.
18
+ - Do not move the primary user experience outside Gradio.
19
+ - Backend helpers are allowed only when they support the Gradio app.
20
+
21
+ ## Deployment Target
22
+
23
+ The app must remain compatible with Hugging Face Spaces using the Gradio SDK.
24
+
25
+ ## AI Model Requirement
26
+
27
+ Any AI agent review must use `Qwen/Qwen3.6-27B` only. Do not add fallback models or alternate LLM providers.
README.md CHANGED
@@ -1,13 +1,46 @@
1
  ---
2
  title: OpenStudy
3
- emoji: 🐠
4
- colorFrom: gray
5
- colorTo: pink
6
  sdk: gradio
7
- sdk_version: 6.18.0
8
- python_version: '3.13'
9
  app_file: app.py
10
  pinned: false
 
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: OpenStudy
3
+ emoji: 🔬
4
+ colorFrom: green
5
+ colorTo: yellow
6
  sdk: gradio
 
 
7
  app_file: app.py
8
  pinned: false
9
+ license: mit
10
  ---
11
 
12
+ # OpenStudy
13
+
14
+ OpenStudy is an open-source Gradio app for screening research studies for reported bias controls, study conduct details, ethics safeguards, funding disclosures, and transparency signals.
15
+
16
+ Users can:
17
+
18
+ - Search public study metadata by DOI, URL, title, or keywords, returning at least 15 papers per topic when public metadata sources have enough matches, and evaluate a result with one click.
19
+ - Evaluate abstracts and available metadata from public sources, with plain-language explanations of what every score and category means.
20
+ - Define their own screening standards and parameters (categories that count, safeguards that must be reported, a minimum score, adjustable risk thresholds, and custom required terms) and get a pass/fail verdict against them on every evaluation.
21
+ - Add their own research study (PDF, DOCX, text, or pasted manuscript) to screen it for bias-control and credibility safeguards against those standards.
22
+ - Upload their own research projects, protocols, benchmark plans, or preregistrations to review planned conduct before or during a study.
23
+ - Keep an in-session project dashboard and export project summaries as JSON.
24
+ - Run an optional Qwen agent review using `Qwen/Qwen3.6-27B` only.
25
+ - Download a Markdown report with evidence snippets and follow-up questions.
26
+
27
+ ## Required AI model
28
+
29
+ OpenStudy's AI review path is restricted to `Qwen/Qwen3.6-27B` only. It does not fall back to another model.
30
+
31
+ For Hugging Face Spaces, configure a Space secret named `HF_TOKEN` with access to the model or paste a temporary token into the Qwen review control in the app.
32
+
33
+ ## Important limitation
34
+
35
+ OpenStudy is a decision-support checklist. It flags what appears to be reported or missing in the supplied text. It does not certify that a study is ethical, unethical, biased, unbiased, valid, or invalid.
36
+
37
+ ## Run locally
38
+
39
+ ```bash
40
+ pip install -r requirements.txt
41
+ python app.py
42
+ ```
43
+
44
+ ## Deploy on Hugging Face Spaces
45
+
46
+ Create a new Space using the Gradio SDK, then upload this repository. Hugging Face Spaces installs `requirements.txt` and runs `app.py`.
app.py ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ gradio>=4.44.1
2
+ huggingface_hub>=0.33.5
3
+ requests>=2.32.0
4
+ beautifulsoup4>=4.12.0
5
+ pypdf>=4.3.0
6
+ python-docx>=1.1.2
7
+ matplotlib>=3.8.0