Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,9 +42,9 @@ def get_system_stats():
|
|
| 42 |
mem = psutil.virtual_memory()
|
| 43 |
disk = psutil.disk_usage('/')
|
| 44 |
return '\n'.join((
|
| 45 |
-
f"CPU: {psutil.cpu_percent(interval=1)}%",
|
| 46 |
-
f"Memory: {round(mem.used / (1024**3), 2)} / {round(mem.total / (1024**3), 2)} GB",
|
| 47 |
-
f"Disk: {round(disk.used / (1024**3), 2)} / {round(disk.total / (1024**3), 2)} GB"
|
| 48 |
))
|
| 49 |
|
| 50 |
def load_new_model(model_id):
|
|
@@ -137,7 +137,7 @@ with gr.Blocks(title="Small MF Model Tester", theme=gr.themes.Soft()) as app:
|
|
| 137 |
gr.Timer(2).tick(get_system_stats, None, stats_output)
|
| 138 |
|
| 139 |
with gr.Group():
|
| 140 |
-
gr.Markdown("### Select or Paste custom model id here
|
| 141 |
with gr.Row():
|
| 142 |
model_id_input = gr.Dropdown(choices=MODELS, label="Model", allow_custom_value=True, show_label=False, scale=3)
|
| 143 |
load_btn = gr.Button("Load", variant="secondary", scale=1)
|
|
@@ -160,7 +160,7 @@ with gr.Blocks(title="Small MF Model Tester", theme=gr.themes.Soft()) as app:
|
|
| 160 |
with gr.Column(scale=2):
|
| 161 |
user_prompt = gr.Textbox(
|
| 162 |
label="Prompt",
|
| 163 |
-
value="Once upon a time in a digital kingdom,
|
| 164 |
placeholder="Enter your prompt here...",
|
| 165 |
lines=5
|
| 166 |
)
|
|
|
|
| 42 |
mem = psutil.virtual_memory()
|
| 43 |
disk = psutil.disk_usage('/')
|
| 44 |
return '\n'.join((
|
| 45 |
+
f"CPU\t: {psutil.cpu_percent(interval=1)}%",
|
| 46 |
+
f"Memory\t: {round(mem.used / (1024**3), 2)} / {round(mem.total / (1024**3), 2)} GB",
|
| 47 |
+
f"Disk\t: {round(disk.used / (1024**3), 2)} / {round(disk.total / (1024**3), 2)} GB"
|
| 48 |
))
|
| 49 |
|
| 50 |
def load_new_model(model_id):
|
|
|
|
| 137 |
gr.Timer(2).tick(get_system_stats, None, stats_output)
|
| 138 |
|
| 139 |
with gr.Group():
|
| 140 |
+
gr.Markdown("### Select or Paste custom model id here")
|
| 141 |
with gr.Row():
|
| 142 |
model_id_input = gr.Dropdown(choices=MODELS, label="Model", allow_custom_value=True, show_label=False, scale=3)
|
| 143 |
load_btn = gr.Button("Load", variant="secondary", scale=1)
|
|
|
|
| 160 |
with gr.Column(scale=2):
|
| 161 |
user_prompt = gr.Textbox(
|
| 162 |
label="Prompt",
|
| 163 |
+
value="Once upon a time in a digital kingdom,",
|
| 164 |
placeholder="Enter your prompt here...",
|
| 165 |
lines=5
|
| 166 |
)
|