Update app.py
Browse files
app.py
CHANGED
|
@@ -1907,6 +1907,8 @@ def selectScript(evt: gr.SelectData, seshid):
|
|
| 1907 |
sesh = getSesh(seshid)
|
| 1908 |
script = evt.value
|
| 1909 |
frmt = evt.value
|
|
|
|
|
|
|
| 1910 |
uploadToScriptGenPromise(frmt, seshid)
|
| 1911 |
#frmt_id_maps[formats[i]]
|
| 1912 |
url = 'https://dreamdemo.pythonanywhere.com/query_textgen'
|
|
@@ -2046,7 +2048,7 @@ with gr.Blocks(theme=gr.themes.Monochrome(), js=js_func, css=css) as demo:
|
|
| 2046 |
color_Palettes = gr.Gallery(label='Proposed Color Palettes', columns=2, height=200, elem_classes=['scroll'])
|
| 2047 |
with gr.Group(visible=False) as script_div:
|
| 2048 |
status_text = gr.Textbox("loading info for color and character\nstand by...\n", show_label=True, interactive=False, lines=3, label='Status')
|
| 2049 |
-
scripts_drop = gr.Dropdown(['Youtube Long-Form', 'Youtube Short-Form', 'Facebook Long-Form', 'Instagram Reel', 'Tiktok', 'LinkedIn'], label='Scripts', interactive=True)
|
| 2050 |
script_display = gr.Textbox(label='Script', max_lines=7)
|
| 2051 |
script_broker = gr.Textbox(visible=False)
|
| 2052 |
item_links_load = gr.Textbox(visible=False)
|
|
|
|
| 1907 |
sesh = getSesh(seshid)
|
| 1908 |
script = evt.value
|
| 1909 |
frmt = evt.value
|
| 1910 |
+
if frmt == 'Status':
|
| 1911 |
+
return 'Select a video format to have a script prepared.'
|
| 1912 |
uploadToScriptGenPromise(frmt, seshid)
|
| 1913 |
#frmt_id_maps[formats[i]]
|
| 1914 |
url = 'https://dreamdemo.pythonanywhere.com/query_textgen'
|
|
|
|
| 2048 |
color_Palettes = gr.Gallery(label='Proposed Color Palettes', columns=2, height=200, elem_classes=['scroll'])
|
| 2049 |
with gr.Group(visible=False) as script_div:
|
| 2050 |
status_text = gr.Textbox("loading info for color and character\nstand by...\n", show_label=True, interactive=False, lines=3, label='Status')
|
| 2051 |
+
scripts_drop = gr.Dropdown(['Status', 'Youtube Long-Form', 'Youtube Short-Form', 'Facebook Long-Form', 'Instagram Reel', 'Tiktok', 'LinkedIn'], label='Scripts', interactive=True)
|
| 2052 |
script_display = gr.Textbox(label='Script', max_lines=7)
|
| 2053 |
script_broker = gr.Textbox(visible=False)
|
| 2054 |
item_links_load = gr.Textbox(visible=False)
|