Spaces:
Running
on
Zero
Running
on
Zero
liujie31
commited on
Commit
·
50c0f11
1
Parent(s):
7562a15
use persistent mem
Browse files- app.py +6 -6
- model_call_counter.txt +1 -0
app.py
CHANGED
|
@@ -250,11 +250,11 @@ Our model is trained separately for different tasks, so it’s best to use the c
|
|
| 250 |
value=40, # Replace with defaults that work for your model
|
| 251 |
)
|
| 252 |
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
gr.on(
|
| 259 |
triggers=[run_button.click, prompt.submit],
|
| 260 |
fn=infer,
|
|
@@ -268,7 +268,7 @@ Our model is trained separately for different tasks, so it’s best to use the c
|
|
| 268 |
num_inference_steps,
|
| 269 |
lora_model,
|
| 270 |
],
|
| 271 |
-
outputs=[result, seed_display],
|
| 272 |
)
|
| 273 |
|
| 274 |
if __name__ == "__main__":
|
|
|
|
| 250 |
value=40, # Replace with defaults that work for your model
|
| 251 |
)
|
| 252 |
|
| 253 |
+
call_count_display = gr.Textbox(
|
| 254 |
+
label="Model Call Count",
|
| 255 |
+
value=f"Model has been called {get_call_count()} times",
|
| 256 |
+
interactive=False
|
| 257 |
+
)
|
| 258 |
gr.on(
|
| 259 |
triggers=[run_button.click, prompt.submit],
|
| 260 |
fn=infer,
|
|
|
|
| 268 |
num_inference_steps,
|
| 269 |
lora_model,
|
| 270 |
],
|
| 271 |
+
outputs=[result, seed_display, call_count_display],
|
| 272 |
)
|
| 273 |
|
| 274 |
if __name__ == "__main__":
|
model_call_counter.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
256
|