Spaces:
Runtime error
Runtime error
upd
Browse files
app.py
CHANGED
|
@@ -86,25 +86,29 @@ with demo:
|
|
| 86 |
)
|
| 87 |
with gr.Row():
|
| 88 |
#example_prompt = gr.Radio( ["Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?\nA: Let’s think step by step.\n"], label= "Choose a sample Prompt")
|
| 89 |
-
example_prompt = gr.Radio( [
|
| 90 |
-
"Instruction: Given an input question, respond with syntactically correct PostgreSQL
|
| 91 |
-
"Instruction: Given an input question, respond with syntactically correct PostgreSQL
|
| 92 |
-
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use tables called 'employees'
|
| 93 |
-
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use
|
| 94 |
-
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use
|
|
|
|
|
|
|
| 95 |
#"Dalle Prompt: Cyberwave vaporpunk art of a kneeling figure, looking up at a glowing neon book icon, smoke and mist, pink and blue lighting, cybernetic sci-fi render\nNew Dalle Prompt: " ], label= "Choose a sample Prompt")
|
| 96 |
|
|
|
|
| 97 |
input_prompt_sql = gr.Textbox(label="Or Write text to get SQL commands...")
|
| 98 |
-
input_prompt_dalle2 = gr.Textbox(label="Or Write sample Dalle2 prompts to get more Prompt ideas...")
|
| 99 |
|
| 100 |
#input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
|
|
|
|
| 101 |
generated_txt = gr.Textbox(lines=7)
|
| 102 |
#output_image = gr.Image(type="filepath", shape=(256,256))
|
| 103 |
|
| 104 |
b1 = gr.Button("Generate SQL")
|
| 105 |
#b2 = gr.Button("Generate Image")
|
| 106 |
|
| 107 |
-
b1.click(text_generate,inputs=[example_prompt, input_prompt_sql
|
| 108 |
#b2.click(poem_to_image, poem_txt, output_image)
|
| 109 |
#examples=examples
|
| 110 |
|
|
|
|
| 86 |
)
|
| 87 |
with gr.Row():
|
| 88 |
#example_prompt = gr.Radio( ["Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?\nA: Let’s think step by step.\n"], label= "Choose a sample Prompt")
|
| 89 |
+
example_prompt = gr.Radio( [
|
| 90 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL\nInput: How many users signed up in the past month?\nPostgreSQL query: ",
|
| 91 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL\nInput: Create a query that displays empfname, emplname, deptid, deptname, location from employee table. Results should be in the ascending order based on the empfname and location.\nPostgreSQL query: ",
|
| 92 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use tables called 'employees'.\nInput: What is the total salary paid to all the employees?\nPostgreSQL query: ",
|
| 93 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use tables called 'employees'.\nInput: List names of all the employees whose name end with 'r'.\nPostgreSQL query: ",
|
| 94 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use tables called 'employees'.\nInput: What are the number of employees in each department?\nPostgreSQL query: ",
|
| 95 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use table called 'employees'.\nInput: Select names of all theemployees who have third character in their name as 't'.\nPostgreSQL query: ",
|
| 96 |
+
"Instruction: Given an input question, respond with syntactically correct PostgreSQL. Only use table called 'employees'.\nInput: Select names of all the employees who are working under 'Peter'\nPostgreSQL query: ", ], label= "Choose a sample Prompt")
|
| 97 |
#"Dalle Prompt: Cyberwave vaporpunk art of a kneeling figure, looking up at a glowing neon book icon, smoke and mist, pink and blue lighting, cybernetic sci-fi render\nNew Dalle Prompt: " ], label= "Choose a sample Prompt")
|
| 98 |
|
| 99 |
+
with gr.Row():
|
| 100 |
input_prompt_sql = gr.Textbox(label="Or Write text to get SQL commands...")
|
| 101 |
+
#input_prompt_dalle2 = gr.Textbox(label="Or Write sample Dalle2 prompts to get more Prompt ideas...")
|
| 102 |
|
| 103 |
#input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
|
| 104 |
+
with gr.Row():
|
| 105 |
generated_txt = gr.Textbox(lines=7)
|
| 106 |
#output_image = gr.Image(type="filepath", shape=(256,256))
|
| 107 |
|
| 108 |
b1 = gr.Button("Generate SQL")
|
| 109 |
#b2 = gr.Button("Generate Image")
|
| 110 |
|
| 111 |
+
b1.click(text_generate,inputs=[example_prompt, input_prompt_sql], outputs=generated_txt) #input_word #input_prompt_dalle2
|
| 112 |
#b2.click(poem_to_image, poem_txt, output_image)
|
| 113 |
#examples=examples
|
| 114 |
|