Spaces:
Runtime error
Runtime error
Timothyxxx
commited on
Commit
·
35c4230
1
Parent(s):
e48bc64
Finalize
Browse files- app.py +3 -3
- resources/demo_description.md +6 -5
app.py
CHANGED
|
@@ -160,7 +160,7 @@ st.markdown('### Try Binder!')
|
|
| 160 |
col1, _ = st.columns(2)
|
| 161 |
with col1:
|
| 162 |
selected_table_title = st.selectbox(
|
| 163 |
-
"Select an example table",
|
| 164 |
(
|
| 165 |
"Estonia men's national volleyball team",
|
| 166 |
"Highest mountain peaks of California",
|
|
@@ -183,7 +183,7 @@ st.dataframe(df)
|
|
| 183 |
# Let user input the question
|
| 184 |
with col1:
|
| 185 |
selected_language = st.selectbox(
|
| 186 |
-
"Select a
|
| 187 |
("Binder-SQL", "Binder-Python"),
|
| 188 |
)
|
| 189 |
if selected_language == 'Binder-SQL':
|
|
@@ -200,7 +200,7 @@ question = st.text_input(
|
|
| 200 |
value=EXAMPLE_TABLES[selected_table_title][1],
|
| 201 |
)
|
| 202 |
|
| 203 |
-
button = st.button("Run
|
| 204 |
if not button:
|
| 205 |
st.stop()
|
| 206 |
|
|
|
|
| 160 |
col1, _ = st.columns(2)
|
| 161 |
with col1:
|
| 162 |
selected_table_title = st.selectbox(
|
| 163 |
+
"Select an example table (We use WikiTQ examples for this demo. But task inputs can include free-form texts and images as well)",
|
| 164 |
(
|
| 165 |
"Estonia men's national volleyball team",
|
| 166 |
"Highest mountain peaks of California",
|
|
|
|
| 183 |
# Let user input the question
|
| 184 |
with col1:
|
| 185 |
selected_language = st.selectbox(
|
| 186 |
+
"Select a target Binder program",
|
| 187 |
("Binder-SQL", "Binder-Python"),
|
| 188 |
)
|
| 189 |
if selected_language == 'Binder-SQL':
|
|
|
|
| 200 |
value=EXAMPLE_TABLES[selected_table_title][1],
|
| 201 |
)
|
| 202 |
|
| 203 |
+
button = st.button("Run Binder!")
|
| 204 |
if not button:
|
| 205 |
st.stop()
|
| 206 |
|
resources/demo_description.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
-
This is an interactive demo of Binder based on GPT3 Codex.
|
| 2 |
-
You can input a question
|
|
|
|
|
|
|
| 3 |
For more details, check out the project [website](https://lm-code-binder.github.io/).
|
| 4 |
|
| 5 |
|
| 6 |
*Note:*
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
- We are trying to make the demo faster and more robust, please let us know if you have any feedback!
|
|
|
|
| 1 |
+
This is an interactive demo of [Binder](https://lm-code-binder.github.io/) based on GPT3 Codex.
|
| 2 |
+
You can input a question(may not be answered by pure SQL/Python),
|
| 3 |
+
The demo will generate a Binder program (e.g., SQL/Python bound with API calls to GPT3 Codex),
|
| 4 |
+
and then execute the Binder program (API calls by prompting Codex and SQL/Python by using SQL/Python interpreters) to drive the final answer.
|
| 5 |
For more details, check out the project [website](https://lm-code-binder.github.io/).
|
| 6 |
|
| 7 |
|
| 8 |
*Note:*
|
| 9 |
+
- The demo might be slow when (high) concurrent requests occur because of the query limit of OpenAI GPT3 Codex.
|
| 10 |
+
- To speed up the demonstration, we only employed a simper version of Binder (e.g., no majority vote), please check the [paper](https://arxiv.org/abs/2210.02875) and [code](https://github.com/HKUNLP/Binder) for more detail.
|
|
|