mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 09:19:23 +01:00
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
This commit is contained in:
commit
d01293861b
@ -143,21 +143,20 @@ def convert_history(history):
|
|||||||
new_history = []
|
new_history = []
|
||||||
for entry in history:
|
for entry in history:
|
||||||
if isinstance(entry['content'], list):
|
if isinstance(entry['content'], list):
|
||||||
image_url = None
|
|
||||||
content = None
|
|
||||||
for item in entry['content']:
|
for item in entry['content']:
|
||||||
if not isinstance(item, dict):
|
if not isinstance(item, dict):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
image_url = None
|
||||||
|
content = None
|
||||||
if item['type'] == 'image_url' and isinstance(item['image_url'], dict):
|
if item['type'] == 'image_url' and isinstance(item['image_url'], dict):
|
||||||
image_url = item['image_url']['url']
|
image_url = item['image_url']['url']
|
||||||
elif item['type'] == 'text' and isinstance(item['text'], str):
|
elif item['type'] == 'text' and isinstance(item['text'], str):
|
||||||
content = item['text']
|
content = item['text']
|
||||||
|
if image_url:
|
||||||
if image_url:
|
new_history.append({"image_url": image_url, "role": "user"})
|
||||||
new_history.append({"image_url": image_url, "role": "user"})
|
if content:
|
||||||
if content:
|
new_history.append({"content": content, "role": "user"})
|
||||||
new_history.append({"content": content, "role": "user"})
|
|
||||||
else:
|
else:
|
||||||
new_history.append(entry)
|
new_history.append(entry)
|
||||||
|
|
||||||
|
@ -260,6 +260,8 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur
|
|||||||
yield ("Please enter a model path")
|
yield ("Please enter a model path")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
repo_id = repo_id.strip()
|
||||||
|
specific_file = specific_file.strip()
|
||||||
downloader = importlib.import_module("download-model").ModelDownloader()
|
downloader = importlib.import_module("download-model").ModelDownloader()
|
||||||
|
|
||||||
progress(0.0)
|
progress(0.0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
bitsandbytes==0.44.*
|
bitsandbytes==0.44.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
bitsandbytes==0.44.*
|
bitsandbytes==0.44.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accelerate==1.0.*
|
accelerate==1.1.*
|
||||||
colorama
|
colorama
|
||||||
datasets
|
datasets
|
||||||
einops
|
einops
|
||||||
|
Loading…
Reference in New Issue
Block a user