Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
|
|
| 1 |
from llmtuner import create_ui
|
| 2 |
-
import gradio as gr
|
| 3 |
|
| 4 |
-
css = '''
|
| 5 |
-
#duplicate-button {
|
| 6 |
-
margin: auto;
|
| 7 |
-
color: white;
|
| 8 |
-
background: #1565c0;
|
| 9 |
-
border-radius: 100vh;
|
| 10 |
-
}
|
| 11 |
-
'''
|
| 12 |
-
title = 'LLaMA Board: A One-stop Web UI for Getting Started with LLaMA Factory'
|
| 13 |
-
description = '<a href="https://github.com/hiyouga/LLaMA-Factory" target="_blank">LLaMA Factory</a>: Training and Evaluating Large Language Models with Minimal Effort'
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
| 19 |
-
demo_ui = create_ui()
|
| 20 |
-
|
| 21 |
-
demo.queue().launch()
|
|
|
|
| 1 |
+
import torch
|
| 2 |
from llmtuner import create_ui
|
|
|
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
if __name__ == "__main__"
|
| 6 |
+
demo_ui = create_ui(demo_mode=(not torch.cuda.is_available()))
|
| 7 |
+
demo.queue().launch()
|
|
|
|
|
|
|
|
|
|
|
|