Spaces:
Sleeping
Sleeping
Add ChatGPT-style Gradio interface for question generation
Browse files- Dockerfile +3 -2
- README.md +19 -13
- requirements.txt +2 -1
Dockerfile
CHANGED
|
@@ -32,6 +32,7 @@ RUN pip install -r requirements.txt
|
|
| 32 |
|
| 33 |
# Copy application files
|
| 34 |
COPY app.py .
|
|
|
|
| 35 |
COPY README.md .
|
| 36 |
|
| 37 |
# Create HF cache directory with proper permissions
|
|
@@ -43,5 +44,5 @@ ENV OMP_NUM_THREADS=4
|
|
| 43 |
# Expose port
|
| 44 |
EXPOSE 7860
|
| 45 |
|
| 46 |
-
# Run the application
|
| 47 |
-
CMD ["python", "
|
|
|
|
| 32 |
|
| 33 |
# Copy application files
|
| 34 |
COPY app.py .
|
| 35 |
+
COPY gradio_app.py .
|
| 36 |
COPY README.md .
|
| 37 |
|
| 38 |
# Create HF cache directory with proper permissions
|
|
|
|
| 44 |
# Expose port
|
| 45 |
EXPOSE 7860
|
| 46 |
|
| 47 |
+
# Run the Gradio application
|
| 48 |
+
CMD ["python", "gradio_app.py"]
|
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title: Question Generation
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
|
@@ -9,24 +9,30 @@ license: apache-2.0
|
|
| 9 |
app_port: 7860
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Question Generation
|
| 13 |
|
| 14 |
-
This Hugging Face Space provides
|
| 15 |
|
| 16 |
## Features
|
| 17 |
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
- π **Fast
|
| 22 |
-
- π§ **GPU Optimized**:
|
|
|
|
| 23 |
|
| 24 |
-
##
|
| 25 |
|
| 26 |
-
###
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
**Request Body:**
|
| 32 |
```json
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Question Generation AI
|
| 3 |
+
emoji: π€
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
|
|
|
| 9 |
app_port: 7860
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Question Generation AI
|
| 13 |
|
| 14 |
+
This Hugging Face Space provides a ChatGPT-style interface for generating thoughtful questions from input statements using the **Google FLAN-T5-Large** model.
|
| 15 |
|
| 16 |
## Features
|
| 17 |
|
| 18 |
+
- π€ **ChatGPT-Style Interface**: Intuitive chat interface for generating questions
|
| 19 |
+
- π― **Customizable**: Adjust number of questions, difficulty level, and creativity
|
| 20 |
+
- π **FLAN-T5 Powered**: Uses Google's instruction-tuned T5 model for high-quality questions
|
| 21 |
+
- π **Fast & Reliable**: Optimized for quick response times
|
| 22 |
+
- π§ **GPU Optimized**: Runs efficiently on NVIDIA A10G hardware
|
| 23 |
+
- π‘ **Educational Focus**: Perfect for creating study materials and assessments
|
| 24 |
|
| 25 |
+
## How to Use
|
| 26 |
|
| 27 |
+
### Chat Interface
|
| 28 |
+
Simply enter any statement or topic in the chat box, and the AI will generate thoughtful questions about it. You can:
|
| 29 |
|
| 30 |
+
- **Adjust Settings**: Control the number of questions (1-10), difficulty level, and creativity
|
| 31 |
+
- **Try Different Topics**: Works great with educational content, research topics, or any text
|
| 32 |
+
- **Interactive Experience**: Chat-like interface similar to ChatGPT
|
| 33 |
+
|
| 34 |
+
### API Access (Still Available)
|
| 35 |
+
The original API endpoints are still accessible at `/generate-questions` for programmatic access.
|
| 36 |
|
| 37 |
**Request Body:**
|
| 38 |
```json
|
requirements.txt
CHANGED
|
@@ -10,4 +10,5 @@ huggingface-hub>=0.19.0
|
|
| 10 |
python-multipart==0.0.6
|
| 11 |
numpy>=1.24.0
|
| 12 |
sentencepiece>=0.1.99
|
| 13 |
-
protobuf>=3.20.0
|
|
|
|
|
|
| 10 |
python-multipart==0.0.6
|
| 11 |
numpy>=1.24.0
|
| 12 |
sentencepiece>=0.1.99
|
| 13 |
+
protobuf>=3.20.0
|
| 14 |
+
gradio>=4.0.0
|