Instructions to use jxu124/TiO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jxu124/TiO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="jxu124/TiO", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jxu124/TiO", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
xj commited on
Commit ·
87cd0d0
1
Parent(s): f4d598d
fix: 修复undo按钮的bug
Browse files- gradio_app.py +2 -0
gradio_app.py
CHANGED
|
@@ -97,6 +97,8 @@ def get_gradio_demo(model, tokenizer, image_processor) -> gr.Interface:
|
|
| 97 |
history: list[tuple[str, str]]) -> tuple[list[tuple[str, str]], str]:
|
| 98 |
try:
|
| 99 |
message, _ = history.pop()
|
|
|
|
|
|
|
| 100 |
except IndexError:
|
| 101 |
message = ''
|
| 102 |
return history, message or ''
|
|
|
|
| 97 |
history: list[tuple[str, str]]) -> tuple[list[tuple[str, str]], str]:
|
| 98 |
try:
|
| 99 |
message, _ = history.pop()
|
| 100 |
+
if not isinstance(message, str):
|
| 101 |
+
message, _ = history.pop()
|
| 102 |
except IndexError:
|
| 103 |
message = ''
|
| 104 |
return history, message or ''
|