david167 commited on
Commit
be67b49
Β·
1 Parent(s): 203ee8d

Add ChatGPT-style Gradio interface for question generation

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -2
  2. README.md +19 -13
  3. 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", "app.py"]
 
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 API
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 API
13
 
14
- This Hugging Face Space provides an API for generating thoughtful questions from input statements using the **DavidAU/Llama-3.1-1-million-ctx-DeepHermes-Deep-Reasoning-8B-GGUF** model.
15
 
16
  ## Features
17
 
18
- - 🧠 **Deep Reasoning**: Uses enhanced reasoning capabilities for better question quality
19
- - πŸ“š **1M Context**: Supports very long input statements (up to 1 million tokens)
20
- - 🎯 **Customizable**: Adjust number of questions, difficulty level, and generation parameters
21
- - πŸš€ **Fast API**: RESTful API with automatic documentation
22
- - πŸ”§ **GPU Optimized**: Optimized for NVIDIA A10G hardware
 
23
 
24
- ## API Endpoints
25
 
26
- ### Generate Questions
27
- **POST** `/generate-questions`
28
 
29
- Generate questions from a given statement.
 
 
 
 
 
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