Text Generation
Transformers
English
Russian
legal
SkillForge45 commited on
Commit
e495836
·
verified ·
1 Parent(s): 5e04fe2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -3
README.md CHANGED
@@ -1,3 +1,81 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - ParlAI/blended_skill_talk
5
+ - convai-challenge/conv_ai_2
6
+ - allenai/social_i_qa
7
+ language:
8
+ - en
9
+ - ru
10
+ metrics:
11
+ - accuracy
12
+ - precision
13
+ - recall
14
+ - perplexity
15
+ - bleu
16
+ - rouge
17
+ base_model:
18
+ - SkillForge45/CyberFuture-1
19
+ new_version: SkillForge45/CyberFuture-2
20
+ pipeline_tag: text-generation
21
+ library_name: transformers
22
+ tags:
23
+ - legal
24
+ ---
25
+ # CyberFuture - Chat With AI
26
+ Uptades:
27
+ **-Web Search**
28
+ # Installation
29
+ 1. Clone the model:
30
+ ```bash
31
+ git clone https://huggingface.co/SkillForge45/CyberFuture-3
32
+ ```
33
+ 2. Install all requirements:
34
+ ```bash
35
+ pip install torch transformers datasets googlesearch-python pyttsx3 speechrecognition fastapi uvicorn
36
+ ```
37
+ # Usage
38
+ **METHOD #1 (HTML web interface):**
39
+ 1. Launch the server:
40
+ ```bash
41
+ python app.py
42
+ ```
43
+ 2. Start the HTML file (html_main.html)
44
+ **METHOD #2 (Python Uasge)**
45
+ Use this Python code:
46
+ ```python
47
+ from model import ChatBot
48
+
49
+ # Initialize the chatbot
50
+ bot = ChatBot()
51
+
52
+ # Optionally train the model (requires GPU for good performance)
53
+ bot.train(epochs=3)
54
+
55
+ # Chat with web search
56
+ response = bot.generate_response("What's the latest news about AI?", use_web=True)
57
+ print(response)
58
+
59
+ # Voice interaction (requires microphone)
60
+ bot.voice_interface.speak(response)
61
+ user_input = bot.voice_interface.listen()
62
+ ```
63
+ **METHOD #3 (Console)**
64
+ 1. Text Chat:
65
+ ```bash
66
+ curl -X POST "http://localhost:8000/chat/" \
67
+ -H "Content-Type: application/x-www-form-urlencoded" \
68
+ -d "prompt=What's the weather in London today?&use_web=true" #web search, if you not need web: use_web=False
69
+ ```
70
+ 2. Voice Chat:
71
+ ```bash
72
+ curl -X POST "http://localhost:8000/chat/" \
73
+ -F "audio_file=@your_recording.wav" \
74
+ -F "use_web=true" \
75
+ -F "use_voice=true"
76
+ ```
77
+ **METHOD 4 (Server)**
78
+ Start the app.py and go to http://localhost:8000/chat
79
+ # License
80
+ This model is licensed, see the LICENSE for more information
81
+