Spaces:
Runtime error
Runtime error
change branding
Browse files
webui.py
CHANGED
@@ -33,7 +33,7 @@ def cached_load(model_name, **kwargs) -> ImageToTextPipeline:
|
|
33 |
if not is_quantization(model_name):
|
34 |
return pipeline("image-to-text", model=model_name, **kwargs)
|
35 |
else:
|
36 |
-
model = AutoModelForPreTraining.from_pretrained(model_name,
|
37 |
processor = AutoProcessor.from_pretrained(model_name)
|
38 |
return pipeline(task="image-to-text", model=model, tokenizer=processor.tokenizer, image_processor=processor.image_processor)
|
39 |
|
@@ -107,15 +107,16 @@ def get_banner():
|
|
107 |
# Ti*k*Z Assistant: Sketches to Vector Graphics with Ti*k*Z
|
108 |
|
109 |
<p>
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
119 |
<a style="display:inline-block" href="https://huggingface.co/spaces/waleko/TikZ-Assistant">
|
120 |
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg" alt="Open in HF Spaces">
|
121 |
</a>
|
|
|
33 |
if not is_quantization(model_name):
|
34 |
return pipeline("image-to-text", model=model_name, **kwargs)
|
35 |
else:
|
36 |
+
model = AutoModelForPreTraining.from_pretrained(model_name, load_in_4bit=True, **kwargs)
|
37 |
processor = AutoProcessor.from_pretrained(model_name)
|
38 |
return pipeline(task="image-to-text", model=model, tokenizer=processor.tokenizer, image_processor=processor.image_processor)
|
39 |
|
|
|
107 |
# Ti*k*Z Assistant: Sketches to Vector Graphics with Ti*k*Z
|
108 |
|
109 |
<p>
|
110 |
+
|
111 |
+
<!--<a style="display:inline-block" href="https://github.com/potamides/AutomaTikZ">
|
112 |
+
<img src="https://img.shields.io/badge/View%20on%20GitHub-green?logo=github&labelColor=gray" alt="View on GitHub">
|
113 |
+
</a>
|
114 |
+
<a style="display:inline-block" href="https://arxiv.org/abs/2310.00367">
|
115 |
+
<img src="https://img.shields.io/badge/View%20on%20arXiv-B31B1B?logo=arxiv&labelColor=gray" alt="View on arXiv">
|
116 |
+
</a>
|
117 |
+
<a style="display:inline-block" href="https://colab.research.google.com/drive/14S22x_8VohMr9pbnlkB4FqtF4n81khIh">
|
118 |
+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab">
|
119 |
+
</a>-->
|
120 |
<a style="display:inline-block" href="https://huggingface.co/spaces/waleko/TikZ-Assistant">
|
121 |
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg" alt="Open in HF Spaces">
|
122 |
</a>
|