Skip to content

Commit b501722

Browse files
committed
Merge branch 'main' of github.com:oobabooga/text-generation-webui
2 parents ffb8986 + d3a280e commit b501722

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Open a terminal and copy and paste these commands one at a time ([install conda]
4040
```
4141
conda create -n textgen
4242
conda activate textgen
43-
conda install torchvision torchaudio pytorch-cuda=11.7 git -c pytorch -c nvidia
43+
conda install torchvision=0.14.1 torchaudio=0.13.1 pytorch-cuda=11.7 git -c pytorch -c nvidia
4444
git clone https://github.com/oobabooga/text-generation-webui
4545
cd text-generation-webui
4646
pip install -r requirements.txt
@@ -51,17 +51,18 @@ The third line assumes that you have an NVIDIA GPU.
5151
* If you have an AMD GPU, replace the third command with this one:
5252

5353
```
54-
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2
54+
pip3 install torch torchvision=0.14.1 torchaudio=0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2
5555
```
5656

5757
* If you are running it in CPU mode, replace the third command with this one:
5858

5959
```
60-
conda install pytorch torchvision torchaudio git -c pytorch
60+
conda install pytorch torchvision=0.14.1 torchaudio=0.13.1 git -c pytorch
6161
```
6262

6363
> **Note**
64-
> 1. If you are on Windows, it may be easier to run the commands above in a WSL environment. The performance may also be better.
64+
> 1. If you are on Windows, it may be easier to run the commands above in a WSL environment. The performance may also be better. A full guide can be found here: [Windows Subsystem for Linux (Ubuntu) Installation Guide
65+
](https://github.com/oobabooga/text-generation-webui/wiki/Windows-Subsystem-for-Linux-(Ubuntu)-Installation-Guide).
6566
> 2. For a more detailed, user-contributed guide, see: [Installation instructions for human beings](https://github.com/oobabooga/text-generation-webui/wiki/Installation-instructions-for-human-beings).
6667
6768
## Installation option 2: one-click installers

extensions/api/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask_cloudflared==0.0.12

extensions/api/script.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,15 @@ def do_POST(self):
7575
def run_server():
7676
server_addr = ('0.0.0.0' if shared.args.listen else '127.0.0.1', params['port'])
7777
server = ThreadingHTTPServer(server_addr, Handler)
78-
print(f'Starting KoboldAI compatible api at http://{server_addr[0]}:{server_addr[1]}/api')
78+
if shared.args.share:
79+
try:
80+
from flask_cloudflared import _run_cloudflared
81+
public_url = _run_cloudflared(params['port'], params['port'] + 1)
82+
print(f'Starting KoboldAI compatible api at {public_url}/api')
83+
except ImportError:
84+
print('You should install flask_cloudflared manually')
85+
else:
86+
print(f'Starting KoboldAI compatible api at http://{server_addr[0]}:{server_addr[1]}/api')
7987
server.serve_forever()
8088

8189
def ui():

0 commit comments

Comments
 (0)