jmisak commited on
Commit
0ebfb23
Β·
verified Β·
1 Parent(s): d6f9f11

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +171 -171
README.md CHANGED
@@ -1,171 +1,171 @@
1
- ---
2
- title: ConversAI - Qualitative Research Assistant
3
- emoji: πŸ”¬
4
- colorFrom: blue
5
- colorTo: purple
6
- sdk: gradio
7
- sdk_version: 5.45.0
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- ---
12
-
13
- # ConversAI - AI-Powered Qualitative Research Assistant
14
-
15
- Battle the blank page, reach global audiences, and uncover insights with AI assistance.
16
-
17
- ---
18
-
19
- > **✨ UPDATED (Nov 2025):** Now uses **local transformers** with **Microsoft Phi-2** - Fast, contextual, and **completely FREE**! No API dependencies, runs directly on HuggingFace Spaces. Generates actual topic-specific questions (not generic templates).
20
-
21
- ---
22
-
23
- ## 🌟 Features
24
-
25
- ### πŸ“ Survey Generation
26
- - Generate professional surveys from simple outlines
27
- - Follow industry best practices automatically
28
- - Choose from qualitative, quantitative, or mixed methods
29
- - Customize number of questions and target audience
30
-
31
- ### 🌍 Survey Translation
32
- - Translate surveys to 18+ languages
33
- - Maintain cultural appropriateness and meaning
34
- - Reach global audiences effortlessly
35
- - Batch translation support
36
-
37
- ### πŸ“Š Data Analysis
38
- - AI-assisted thematic analysis
39
- - Sentiment analysis and emotional insights
40
- - Automatic pattern and trend detection
41
- - Generate actionable insights and recommendations
42
- - Export detailed analysis reports
43
-
44
- ## πŸš€ Quick Start
45
-
46
- **On HuggingFace Spaces:** Works immediately with zero configuration! Uses the free HF Inference API.
47
-
48
- **Workflow:**
49
- 1. **Generate a Survey**: Start with an outline or topic description
50
- 2. **Translate**: Select target languages to reach global audiences
51
- 3. **Collect Responses**: Use the generated survey with your participants
52
- 4. **Analyze**: Upload responses to uncover key findings and trends
53
-
54
- ## πŸ”§ Configuration
55
-
56
- ### Default: Local Transformers (Completely FREE!)
57
-
58
- **✨ Zero configuration needed!** ConversAI works out-of-the-box on HuggingFace Spaces using local model loading.
59
-
60
- **Default Model:** microsoft/phi-2
61
- - βœ… **100% Free** - No API keys, no costs, ever
62
- - βœ… **Excellent quality** - 2.7GB causal language model, great at creative text generation
63
- - βœ… **Good speed** - Typically 5-10 seconds per request after initial load
64
- - βœ… **No API dependencies** - Runs entirely on your Space's compute
65
- - βœ… **Private** - All processing happens locally, nothing sent to external APIs
66
- - βœ… **Contextual** - Generates relevant, topic-specific questions (not generic)
67
-
68
- **Setup for HuggingFace Spaces:**
69
- - Just deploy - models download automatically on first run
70
- - **No API keys or tokens required!**
71
- - Models are cached after first download for faster subsequent loads
72
-
73
- ### Alternative Free Models
74
-
75
- You can try different free models by setting the `LLM_MODEL` environment variable:
76
-
77
- **Recommended Free Models (Local Transformers):**
78
-
79
- | Model | Best For | Speed | Quality | Model Size |
80
- |-------|----------|-------|---------|------------|
81
- | **TinyLlama/TinyLlama-1.1B-Chat-v1.0** | Quick testing | ⚑⚑⚑ Very Fast | ⭐⭐ Fair | 1.1GB |
82
- | **google/gemma-2b-it** | Faster alternative | ⚑⚑ Fast | ⭐⭐⭐ Good | 2GB |
83
- | **microsoft/phi-2** (default) | **Recommended** - best balance | ⚑ Good | ⭐⭐⭐⭐ Excellent | 2.7GB |
84
- | **mistralai/Mistral-7B-Instruct-v0.2** | Maximum quality | ⚑ Slower | ⭐⭐⭐⭐⭐ Best | 7GB |
85
-
86
- **Note:** These are causal language models (decoder-only) designed for text generation. **Do NOT use Flan-T5 models** - they copy examples instead of generating contextual questions.
87
-
88
- **To change model:**
89
- ```bash
90
- # In Space Settings β†’ Variables
91
- LLM_MODEL=google/gemma-2b-it # Faster alternative
92
-
93
- # Or for maximum quality (requires more memory)
94
- LLM_MODEL=mistralai/Mistral-7B-Instruct-v0.2
95
- ```
96
-
97
- **Why Local Transformers?**
98
- - βœ… **No API dependencies** - runs entirely on your Space
99
- - βœ… **No 404 errors** - no network issues
100
- - βœ… **Fast after loading** - models cached in memory
101
- - βœ… **Instruction-tuned** - designed for following prompts
102
- - βœ… **Privacy** - all processing happens locally
103
-
104
- ### Tips for Best Performance with Local Models
105
-
106
- 1. **Use Phi-2 (default)** - Best balance of quality and resource usage
107
- 2. **First load takes time** - Model downloads and loads (~2-3 minutes for Phi-2)
108
- 3. **Subsequent requests are fast** - Model stays in memory (5-10 seconds)
109
- 4. **For maximum quality** - Use Mistral-7B-Instruct (requires 8GB+ RAM)
110
- 5. **For faster loading** - Use Gemma-2B-IT or TinyLlama (good quality, smaller)
111
- 6. **Avoid Flan-T5 models** - They copy examples instead of generating contextual questions
112
- 7. **Be specific in outlines** - More detail helps model generate better questions
113
-
114
- ## πŸ“¦ Installation
115
-
116
- ```bash
117
- # Install dependencies
118
- pip install -r requirements.txt
119
-
120
- # Check environment setup (optional but recommended)
121
- python check_env.py
122
-
123
- # Run the app
124
- python app.py
125
- ```
126
-
127
- ## πŸ—οΈ Architecture
128
-
129
- ConversAI is built with a modular architecture:
130
-
131
- - **llm_backend.py** - Unified LLM interface supporting multiple providers
132
- - **survey_generator.py** - AI-powered survey generation
133
- - **survey_translator.py** - Multi-language translation engine
134
- - **data_analyzer.py** - Qualitative data analysis and insights
135
- - **app.py** - Gradio-based web interface
136
- - **export_utils.py** - Export to JSON, CSV, Markdown
137
-
138
- ## πŸ“„ Data Privacy
139
-
140
- - All processing is done through your configured LLM provider
141
- - No data is stored permanently by this application
142
- - Survey data and responses remain in your control
143
- - Suitable for sensitive research projects
144
-
145
- ## 🀝 Contributing
146
-
147
- Contributions are welcome! This is a production-grade application designed for real-world qualitative research.
148
-
149
- ## πŸ“ License
150
-
151
- MIT License - Feel free to use for research and commercial purposes.
152
-
153
- ---
154
-
155
- ## πŸ“š Documentation
156
-
157
- **New to ConversAI?** Start with **[USER_GUIDE.md](USER_GUIDE.md)** for a complete walkthrough.
158
-
159
- **Quick Links:**
160
- - πŸ“– [Complete User Guide](USER_GUIDE.md) - How to use ConversAI (START HERE)
161
- - ⚑ [Quick Start for HF Spaces](QUICK_START_HF_SPACES.md) - 5-minute deployment
162
- - πŸ”§ [Troubleshooting](TROUBLESHOOTING.md) - Common issues and solutions
163
- - πŸ†“ [Free Models Guide](FREE_MODELS.md) - Best free models to use
164
-
165
- **Diagnostic Tools:**
166
- - Run `python check_env.py` - Check your environment setup
167
- - Run `python test_hf_backend.py` - Test HuggingFace connection
168
-
169
- ---
170
-
171
- Built with ❀️ using Gradio and state-of-the-art open-source LLMs
 
1
+ ---
2
+ title: Project Echo - Qualitative Research Assistant
3
+ emoji: πŸ”¬
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 5.49.1
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
+
13
+ # ConversAI - AI-Powered Qualitative Research Assistant
14
+
15
+ Battle the blank page, reach global audiences, and uncover insights with AI assistance.
16
+
17
+ ---
18
+
19
+ > **✨ UPDATED (Nov 2025):** Now uses **local transformers** with **Microsoft Phi-2** - Fast, contextual, and **completely FREE**! No API dependencies, runs directly on HuggingFace Spaces. Generates actual topic-specific questions (not generic templates).
20
+
21
+ ---
22
+
23
+ ## 🌟 Features
24
+
25
+ ### πŸ“ Survey Generation
26
+ - Generate professional surveys from simple outlines
27
+ - Follow industry best practices automatically
28
+ - Choose from qualitative, quantitative, or mixed methods
29
+ - Customize number of questions and target audience
30
+
31
+ ### 🌍 Survey Translation
32
+ - Translate surveys to 18+ languages
33
+ - Maintain cultural appropriateness and meaning
34
+ - Reach global audiences effortlessly
35
+ - Batch translation support
36
+
37
+ ### πŸ“Š Data Analysis
38
+ - AI-assisted thematic analysis
39
+ - Sentiment analysis and emotional insights
40
+ - Automatic pattern and trend detection
41
+ - Generate actionable insights and recommendations
42
+ - Export detailed analysis reports
43
+
44
+ ## πŸš€ Quick Start
45
+
46
+ **On HuggingFace Spaces:** Works immediately with zero configuration! Uses the free HF Inference API.
47
+
48
+ **Workflow:**
49
+ 1. **Generate a Survey**: Start with an outline or topic description
50
+ 2. **Translate**: Select target languages to reach global audiences
51
+ 3. **Collect Responses**: Use the generated survey with your participants
52
+ 4. **Analyze**: Upload responses to uncover key findings and trends
53
+
54
+ ## πŸ”§ Configuration
55
+
56
+ ### Default: Local Transformers (Completely FREE!)
57
+
58
+ **✨ Zero configuration needed!** ConversAI works out-of-the-box on HuggingFace Spaces using local model loading.
59
+
60
+ **Default Model:** microsoft/phi-2
61
+ - βœ… **100% Free** - No API keys, no costs, ever
62
+ - βœ… **Excellent quality** - 2.7GB causal language model, great at creative text generation
63
+ - βœ… **Good speed** - Typically 5-10 seconds per request after initial load
64
+ - βœ… **No API dependencies** - Runs entirely on your Space's compute
65
+ - βœ… **Private** - All processing happens locally, nothing sent to external APIs
66
+ - βœ… **Contextual** - Generates relevant, topic-specific questions (not generic)
67
+
68
+ **Setup for HuggingFace Spaces:**
69
+ - Just deploy - models download automatically on first run
70
+ - **No API keys or tokens required!**
71
+ - Models are cached after first download for faster subsequent loads
72
+
73
+ ### Alternative Free Models
74
+
75
+ You can try different free models by setting the `LLM_MODEL` environment variable:
76
+
77
+ **Recommended Free Models (Local Transformers):**
78
+
79
+ | Model | Best For | Speed | Quality | Model Size |
80
+ |-------|----------|-------|---------|------------|
81
+ | **TinyLlama/TinyLlama-1.1B-Chat-v1.0** | Quick testing | ⚑⚑⚑ Very Fast | ⭐⭐ Fair | 1.1GB |
82
+ | **google/gemma-2b-it** | Faster alternative | ⚑⚑ Fast | ⭐⭐⭐ Good | 2GB |
83
+ | **microsoft/phi-2** (default) | **Recommended** - best balance | ⚑ Good | ⭐⭐⭐⭐ Excellent | 2.7GB |
84
+ | **mistralai/Mistral-7B-Instruct-v0.2** | Maximum quality | ⚑ Slower | ⭐⭐⭐⭐⭐ Best | 7GB |
85
+
86
+ **Note:** These are causal language models (decoder-only) designed for text generation. **Do NOT use Flan-T5 models** - they copy examples instead of generating contextual questions.
87
+
88
+ **To change model:**
89
+ ```bash
90
+ # In Space Settings β†’ Variables
91
+ LLM_MODEL=google/gemma-2b-it # Faster alternative
92
+
93
+ # Or for maximum quality (requires more memory)
94
+ LLM_MODEL=mistralai/Mistral-7B-Instruct-v0.2
95
+ ```
96
+
97
+ **Why Local Transformers?**
98
+ - βœ… **No API dependencies** - runs entirely on your Space
99
+ - βœ… **No 404 errors** - no network issues
100
+ - βœ… **Fast after loading** - models cached in memory
101
+ - βœ… **Instruction-tuned** - designed for following prompts
102
+ - βœ… **Privacy** - all processing happens locally
103
+
104
+ ### Tips for Best Performance with Local Models
105
+
106
+ 1. **Use Phi-2 (default)** - Best balance of quality and resource usage
107
+ 2. **First load takes time** - Model downloads and loads (~2-3 minutes for Phi-2)
108
+ 3. **Subsequent requests are fast** - Model stays in memory (5-10 seconds)
109
+ 4. **For maximum quality** - Use Mistral-7B-Instruct (requires 8GB+ RAM)
110
+ 5. **For faster loading** - Use Gemma-2B-IT or TinyLlama (good quality, smaller)
111
+ 6. **Avoid Flan-T5 models** - They copy examples instead of generating contextual questions
112
+ 7. **Be specific in outlines** - More detail helps model generate better questions
113
+
114
+ ## πŸ“¦ Installation
115
+
116
+ ```bash
117
+ # Install dependencies
118
+ pip install -r requirements.txt
119
+
120
+ # Check environment setup (optional but recommended)
121
+ python check_env.py
122
+
123
+ # Run the app
124
+ python app.py
125
+ ```
126
+
127
+ ## πŸ—οΈ Architecture
128
+
129
+ ConversAI is built with a modular architecture:
130
+
131
+ - **llm_backend.py** - Unified LLM interface supporting multiple providers
132
+ - **survey_generator.py** - AI-powered survey generation
133
+ - **survey_translator.py** - Multi-language translation engine
134
+ - **data_analyzer.py** - Qualitative data analysis and insights
135
+ - **app.py** - Gradio-based web interface
136
+ - **export_utils.py** - Export to JSON, CSV, Markdown
137
+
138
+ ## πŸ“„ Data Privacy
139
+
140
+ - All processing is done through your configured LLM provider
141
+ - No data is stored permanently by this application
142
+ - Survey data and responses remain in your control
143
+ - Suitable for sensitive research projects
144
+
145
+ ## 🀝 Contributing
146
+
147
+ Contributions are welcome! This is a production-grade application designed for real-world qualitative research.
148
+
149
+ ## πŸ“ License
150
+
151
+ MIT License - Feel free to use for research and commercial purposes.
152
+
153
+ ---
154
+
155
+ ## πŸ“š Documentation
156
+
157
+ **New to ConversAI?** Start with **[USER_GUIDE.md](USER_GUIDE.md)** for a complete walkthrough.
158
+
159
+ **Quick Links:**
160
+ - πŸ“– [Complete User Guide](USER_GUIDE.md) - How to use ConversAI (START HERE)
161
+ - ⚑ [Quick Start for HF Spaces](QUICK_START_HF_SPACES.md) - 5-minute deployment
162
+ - πŸ”§ [Troubleshooting](TROUBLESHOOTING.md) - Common issues and solutions
163
+ - πŸ†“ [Free Models Guide](FREE_MODELS.md) - Best free models to use
164
+
165
+ **Diagnostic Tools:**
166
+ - Run `python check_env.py` - Check your environment setup
167
+ - Run `python test_hf_backend.py` - Test HuggingFace connection
168
+
169
+ ---
170
+
171
+ Built with ❀️ using Gradio and state-of-the-art open-source LLMs