Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -92,29 +92,29 @@ with demo:
|
|
92 |
)
|
93 |
with gr.Row():
|
94 |
#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")
|
95 |
-
example_prompt = gr.Radio( [
|
96 |
-
"Instruction: Given an input question, respond with syntactically correct PostgreSQL\nInput: How many users signed up in the past month?\nPostgreSQL query: ",
|
97 |
-
"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: ",
|
98 |
-
"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: ",
|
99 |
-
"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: ",
|
100 |
-
"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: ",
|
101 |
-
"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: ",
|
102 |
-
"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")
|
103 |
#"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")
|
104 |
|
105 |
#with gr.Row():
|
106 |
-
|
107 |
#input_prompt_dalle2 = gr.Textbox(label="Or Write sample Dalle2 prompts to get more Prompt ideas...")
|
108 |
|
109 |
#input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
|
110 |
with gr.Row():
|
111 |
-
generated_txt = gr.Textbox(lines=
|
112 |
#output_image = gr.Image(type="filepath", shape=(256,256))
|
113 |
|
114 |
-
b1 = gr.Button("Generate
|
115 |
#b2 = gr.Button("Generate Image")
|
116 |
|
117 |
-
b1.click(text_generate,inputs=
|
118 |
#b2.click(poem_to_image, poem_txt, output_image)
|
119 |
#examples=examples
|
120 |
|
|
|
92 |
)
|
93 |
with gr.Row():
|
94 |
#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")
|
95 |
+
#example_prompt = gr.Radio( [
|
96 |
+
#"Instruction: Given an input question, respond with syntactically correct PostgreSQL\nInput: How many users signed up in the past month?\nPostgreSQL query: ",
|
97 |
+
#"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: ",
|
98 |
+
#"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: ",
|
99 |
+
#"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: ",
|
100 |
+
#"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: ",
|
101 |
+
#"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: ",
|
102 |
+
#"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")
|
103 |
#"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")
|
104 |
|
105 |
#with gr.Row():
|
106 |
+
input_prompt = gr.Textbox(label="Write some text to get started...") #input_prompt_sql
|
107 |
#input_prompt_dalle2 = gr.Textbox(label="Or Write sample Dalle2 prompts to get more Prompt ideas...")
|
108 |
|
109 |
#input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
|
110 |
with gr.Row():
|
111 |
+
generated_txt = gr.Textbox(lines=15)
|
112 |
#output_image = gr.Image(type="filepath", shape=(256,256))
|
113 |
|
114 |
+
b1 = gr.Button("Generate Text")
|
115 |
#b2 = gr.Button("Generate Image")
|
116 |
|
117 |
+
b1.click(text_generate,inputs=input_pr, outputs=generated_txt) #input_word #input_prompt_dalle2 #input_prompt_sql #example_prompt
|
118 |
#b2.click(poem_to_image, poem_txt, output_image)
|
119 |
#examples=examples
|
120 |
|