Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,6 @@ from datetime import datetime
|
|
| 5 |
|
| 6 |
now2 = 0
|
| 7 |
|
| 8 |
-
|
| 9 |
def get_current_time():
|
| 10 |
now = datetime.now()
|
| 11 |
now2 = now
|
|
@@ -26,6 +25,11 @@ def gen_fn(model_str, prompt):
|
|
| 26 |
noise = str(randint(0, 9999))
|
| 27 |
return models_load[model_str](f'{prompt} {noise}')
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
def make_me():
|
| 30 |
with gr.Row():
|
| 31 |
txt_input = gr.Textbox(label='Your prompt:', lines=3, width=800, max_height=100)
|
|
@@ -52,15 +56,11 @@ def make_me():
|
|
| 52 |
with gr.Row():
|
| 53 |
gr.HTML()
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
js_code = """
|
| 58 |
-
|
| 59 |
-
console.log('ghgh');
|
| 60 |
-
|
| 61 |
"""
|
| 62 |
|
| 63 |
-
with gr.Blocks(css="div.float.svelte-1mwvhlq {
|
| 64 |
gr.Markdown("<script>" + js_code + "</script>")
|
| 65 |
make_me()
|
| 66 |
|
|
|
|
| 5 |
|
| 6 |
now2 = 0
|
| 7 |
|
|
|
|
| 8 |
def get_current_time():
|
| 9 |
now = datetime.now()
|
| 10 |
now2 = now
|
|
|
|
| 25 |
noise = str(randint(0, 9999))
|
| 26 |
return models_load[model_str](f'{prompt} {noise}')
|
| 27 |
|
| 28 |
+
# Define extend_choices function
|
| 29 |
+
def extend_choices(choices):
|
| 30 |
+
# Example implementation: extend choices with additional logic if needed
|
| 31 |
+
return choices
|
| 32 |
+
|
| 33 |
def make_me():
|
| 34 |
with gr.Row():
|
| 35 |
txt_input = gr.Textbox(label='Your prompt:', lines=3, width=800, max_height=100)
|
|
|
|
| 56 |
with gr.Row():
|
| 57 |
gr.HTML()
|
| 58 |
|
|
|
|
|
|
|
| 59 |
js_code = """
|
| 60 |
+
console.log('ghgh');
|
|
|
|
|
|
|
| 61 |
"""
|
| 62 |
|
| 63 |
+
with gr.Blocks(css="div.float.svelte-1mwvhlq { position: absolute; top: var(--block-label-margin); left: var(--block-label-margin); background: none; border: none;}") as demo:
|
| 64 |
gr.Markdown("<script>" + js_code + "</script>")
|
| 65 |
make_me()
|
| 66 |
|