Text Generation
Transformers
English
Russian
legal
File size: 1,807 Bytes
e495836
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
license: mit
datasets:
- ParlAI/blended_skill_talk
- convai-challenge/conv_ai_2
- allenai/social_i_qa
language:
- en
- ru
metrics:
- accuracy
- precision
- recall
- perplexity
- bleu
- rouge
base_model:
- SkillForge45/CyberFuture-1
new_version: SkillForge45/CyberFuture-2
pipeline_tag: text-generation
library_name: transformers
tags:
- legal
---
# CyberFuture - Chat With AI
Uptades:
**-Web Search**
# Installation
1. Clone the model:
```bash
git clone https://huggingface.co/SkillForge45/CyberFuture-3
```
2. Install all requirements:
```bash
pip install torch transformers datasets googlesearch-python pyttsx3 speechrecognition fastapi uvicorn
```
# Usage
**METHOD #1 (HTML web interface):**
1. Launch the server:
```bash
python app.py
```
2. Start the HTML file (html_main.html)
**METHOD #2 (Python Uasge)**
Use this Python code:
```python
from model import ChatBot

# Initialize the chatbot
bot = ChatBot()

# Optionally train the model (requires GPU for good performance)
bot.train(epochs=3)

# Chat with web search
response = bot.generate_response("What's the latest news about AI?", use_web=True)
print(response)

# Voice interaction (requires microphone)
bot.voice_interface.speak(response)
user_input = bot.voice_interface.listen()
```
**METHOD #3 (Console)**
1. Text Chat:
```bash
curl -X POST "http://localhost:8000/chat/" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "prompt=What's the weather in London today?&use_web=true" #web search, if you not need web: use_web=False
```
2. Voice Chat:
```bash
curl -X POST "http://localhost:8000/chat/" \
-F "audio_file=@your_recording.wav" \
-F "use_web=true" \
-F "use_voice=true"
```
**METHOD 4 (Server)**
Start the app.py and go to http://localhost:8000/chat
# License
This model is licensed, see the LICENSE for more information