milwright commited on
Commit
a51de86
Β·
1 Parent(s): 72c7aa2

update README.md with current project details

Browse files
Files changed (1) hide show
  1. README.md +127 -38
README.md CHANGED
@@ -1,61 +1,150 @@
1
  ---
2
- title: Chat UI Helper
3
- emoji: πŸ’»
4
- colorFrom: gray
5
- colorTo: red
6
  sdk: gradio
 
7
  app_file: app.py
8
  pinned: true
9
- thumbnail: >-
10
- https://cdn-uploads.huggingface.co/production/uploads/65a0caa15dfd8b9b1f3aa3d3/8cruZmIioPrYoTN8o-wcE.png
11
- short_description: Configure, download, and deploy a simple chat interface
12
  license: gpl-3.0
13
- sdk_version: 5.37.0
14
  ---
15
 
16
- # Chat UI Helper
 
 
17
 
18
- A Gradio-based tool for generating and configuring chat interfaces for HuggingFace Spaces. Create deployable packages with custom assistants and web scraping capabilities.
19
 
20
- ## Features
 
 
 
 
 
 
 
 
21
 
22
- ### Spaces Configuration
23
- - **Custom Assistant Creation**: Define role, purpose, audience, and tasks
24
- - **Template System**: Choose from research assistant template or build from scratch
25
- - **Tool Integration**: Optional dynamic URL fetching
26
- - **Access Control**: Secure access code protection for educational use
27
- - **Complete Deployment Package**: Generates app.py, requirements.txt, and config.json
28
 
29
- ### Chat Support
30
- - **Expert Guidance**: Get personalized help with Gradio configurations
31
- - **Context-Aware**: URL grounding for informed responses about HuggingFace Spaces
32
- - **Deployment Assistance**: Troubleshooting and best practices
33
 
34
- ## Quick Start
 
 
 
 
35
 
36
- ### Running Locally
 
 
37
  ```bash
 
 
 
 
38
  pip install -r requirements.txt
 
 
39
  python app.py
40
  ```
41
 
42
- ### For Chat Support (Optional)
43
- Set your OpenRouter API key as a secret:
44
- - Go to Settings β†’ Variables and secrets
45
- - Add secret: `OPENROUTER_API_KEY`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- ## Generated Space Features
48
 
49
- Each generated space includes:
50
- - **OpenRouter API Integration**: Support for multiple LLM models
51
- - **Web Scraping**: Simple HTTP requests with BeautifulSoup for URL content fetching
52
- - **Access Control**: Environment-based student access codes
53
- - **Modern UI**: Gradio 5.x ChatInterface with proper message formatting
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
- ## Architecture
56
 
57
- - **Main Application**: `app.py` with three-tab interface
58
- - **Web Scraping**: HTTP requests with BeautifulSoup for content extraction
59
- - **Template Generation**: Complete HuggingFace Space creation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
- For detailed development guidance, see [CLAUDE.md](CLAUDE.md).
 
1
  ---
2
+ title: ChatUI Helper
3
+ emoji: πŸ’¬
4
+ colorFrom: blue
5
+ colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 5.37.0
8
  app_file: app.py
9
  pinned: true
 
 
 
10
  license: gpl-3.0
11
+ short_description: Create AI chat interfaces for HuggingFace Spaces
12
  ---
13
 
14
+ # ChatUI Helper
15
+
16
+ A comprehensive tool for creating, configuring, and deploying customizable AI chat interfaces on HuggingFace Spaces. Designed for educators and developers to quickly generate pedagogically-focused AI assistants.
17
 
18
+ ## 🎯 Key Features
19
 
20
+ ### Configuration & Templates
21
+ - **Academic Templates**: Pre-configured templates for educational use cases
22
+ - Socratic Research Chat
23
+ - STEM Adventure Games
24
+ - Course Assistant Example
25
+ - Language Learning Partner
26
+ - **Custom Configuration**: Build from scratch with full control
27
+ - **Multi-Language Support**: Configure assistants to respond in any language
28
+ - **Theme Selection**: Choose from Gradio themes (Default, Soft, Glass, Monochrome, Base)
29
 
30
+ ### URL Grounding & Context
31
+ - **Grounding URLs**: Add up to 10 reference URLs for contextual responses
32
+ - Primary sources (URLs 1-2): 8000 character limit
33
+ - Secondary sources (URLs 3+): 2500 character limit
34
+ - **Dynamic URL Extraction**: Automatically fetch content from URLs in user messages
35
+ - **Smart Content Processing**: HTML parsing with BeautifulSoup
36
 
37
+ ### Security & Access Control
38
+ - **Access Codes**: Password-protect your Space for controlled access
39
+ - **API Key Management**: Secure handling of OpenRouter API keys
40
+ - **HuggingFace Token Integration**: Enable configuration updates without redeployment
41
 
42
+ ### Preview & Testing
43
+ - **Live Preview**: Test your assistant before deployment
44
+ - **Real-time Configuration**: See changes instantly
45
+ - **File Upload Support**: Test document processing capabilities
46
+ - **Conversation Export**: Download chat history as markdown
47
 
48
+ ## πŸš€ Quick Start
49
+
50
+ ### Local Development
51
  ```bash
52
+ # Clone the repository
53
+ git clone https://huggingface.co/spaces/milwright/chatui-helper
54
+
55
+ # Install dependencies
56
  pip install -r requirements.txt
57
+
58
+ # Run the application
59
  python app.py
60
  ```
61
 
62
+ ### Environment Variables (Optional)
63
+ ```bash
64
+ # For preview functionality
65
+ API_KEY=sk-or-your-openrouter-key
66
+
67
+ # For HuggingFace integration
68
+ HF_TOKEN=your-huggingface-token
69
+ ```
70
+
71
+ ## πŸ“¦ Generated Space Contents
72
+
73
+ Each generated package includes:
74
+ - **app.py**: Complete Gradio 5.x application
75
+ - **requirements.txt**: All necessary dependencies
76
+ - **config.json**: Your configuration settings
77
+ - **README.md**: Deployment instructions
78
+
79
+ ### Supported Models
80
+ Through OpenRouter integration:
81
+ - Google Gemini (Flash, Pro)
82
+ - OpenAI GPT-4, GPT-3.5
83
+ - Anthropic Claude 3 series
84
+ - Meta Llama 3 models
85
+ - Mistral/Mixtral models
86
+ - DeepSeek reasoning models
87
+ - Nvidia Llama optimizations
88
+ - Qwen multilingual models
89
 
90
+ ## πŸ“š Documentation
91
 
92
+ The application includes comprehensive built-in documentation:
93
+ - **Step 1**: Configure & Preview Your Space
94
+ - Templates & Identity
95
+ - System Configuration
96
+ - Example Prompts
97
+ - URL Grounding
98
+ - API Configuration
99
+ - Upload Configuration
100
+ - Preview Testing
101
+ - **Step 2**: Generate & Deploy
102
+ - Package Generation
103
+ - Space Creation
104
+ - File Upload
105
+ - Secret Configuration
106
+ - Verification & Iteration
107
+ - **Troubleshooting**: Common issues and solutions
108
+ - **Additional Resources**: Links to relevant documentation
109
 
110
+ ## πŸ—οΈ Architecture
111
 
112
+ ### Core Components
113
+ - **SpaceGenerator**: Handles configuration and package generation
114
+ - **ConfigurationManager**: Manages settings with automatic backups
115
+ - **Support Documentation**: Nested accordion interface for easy navigation
116
+ - **Template System**: String-based templating for code generation
117
+
118
+ ### File Structure
119
+ ```
120
+ chatui-helper/
121
+ β”œβ”€β”€ app.py # Main application
122
+ β”œβ”€β”€ space_template.py # Template for generated spaces
123
+ β”œβ”€β”€ utils.py # Shared utilities
124
+ β”œβ”€β”€ support_docs.py # Documentation interface
125
+ β”œβ”€β”€ academic_templates.json # Pre-configured templates
126
+ β”œβ”€β”€ requirements.txt # Dependencies
127
+ └── CLAUDE.md # Development guidance
128
+ ```
129
+
130
+ ## 🀝 Contributing
131
+
132
+ This project is designed for educational use. Contributions that enhance pedagogical value are welcome:
133
+ - New academic templates
134
+ - Improved documentation
135
+ - Bug fixes and optimizations
136
+ - Accessibility improvements
137
+
138
+ ## πŸ“„ License
139
+
140
+ GPL-3.0 - See LICENSE file for details
141
+
142
+ ## πŸ”— Links
143
+
144
+ - [HuggingFace Spaces Documentation](https://huggingface.co/docs/hub/spaces-overview)
145
+ - [Gradio Documentation](https://gradio.app/docs/)
146
+ - [OpenRouter API](https://openrouter.ai/)
147
+
148
+ ---
149
 
150
+ Built with ❀️ for educators and learners