Skip to content

Commit 289276e

Browse files
authored
Set versions of promptsource 0.82 and Python 3.7 (#547)
* Revert to streamlit 0.82. * Pin Python 3.7. * Fix Python version declaration.
1 parent e27351e commit 289276e

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WIP
66
## Setup
77
1. Download the repo
88
2. Navigate to root directory of the repo
9-
3. Install requirements with `pip install -r requirements.txt`
9+
3. Install requirements with `pip install -r requirements.txt` in a Python 3.7 environment
1010

1111
## Running
1212
From the root directory of the repo, you can launch the editor with
@@ -50,3 +50,5 @@ For more information, read the [Contribution guidelines](CONTRIBUTING.md).
5050
## Known Issues
5151

5252
**Warning or Error about Darwin on OS X:** Try downgrading PyArrow to 3.0.0.
53+
54+
**ConnectionRefusedError: [Errno 61] Connection refused:** Happens occasionally. Try restarting the app.

promptsource/app.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def get_infos(d_name):
368368
continue
369369
example = dataset[ex_idx]
370370
example = removeHyphen(example)
371-
col1, _, col2 = st.columns([12, 1, 12])
371+
col1, _, col2 = st.beta_columns([12, 1, 12])
372372
with col1:
373373
st.write(example)
374374
if num_templates > 0:
@@ -392,7 +392,7 @@ def get_infos(d_name):
392392
#
393393
# Create a new template or select an existing one
394394
#
395-
col1a, col1b, _, col2 = st.columns([9, 9, 1, 6])
395+
col1a, col1b, _, col2 = st.beta_columns([9, 9, 1, 6])
396396

397397
# current_templates_key and state.templates_key are keys for the templates object
398398
current_templates_key = (dataset_key, conf_option.name if conf_option else None)
@@ -426,7 +426,7 @@ def get_infos(d_name):
426426
else:
427427
state.new_template_name = None
428428

429-
with col1b, st.expander("or Select Template", expanded=True):
429+
with col1b, st.beta_expander("or Select Template", expanded=True):
430430
dataset_templates = template_collection.get_dataset(*state.templates_key)
431431
template_list = dataset_templates.all_template_names
432432
if state.template_name:
@@ -450,15 +450,15 @@ def get_infos(d_name):
450450
\n- **Implicit situation or contextualization**: how explicit is the query? For instance, *Given this review, would you buy this product?* is an indirect way to ask whether the review is positive.
451451
"""
452452

453-
col1, _, _ = st.columns([18, 1, 6])
453+
col1, _, _ = st.beta_columns([18, 1, 6])
454454
with col1:
455455
if state.template_name is not None:
456456
show_text(variety_guideline)
457457

458458
#
459459
# Edit the created or selected template
460460
#
461-
col1, _, col2 = st.columns([18, 1, 6])
461+
col1, _, col2 = st.beta_columns([18, 1, 6])
462462
with col1:
463463
if state.template_name is not None:
464464
template = dataset_templates[state.template_name]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ flake8
44
isort==5.8.0
55
pytest
66
pyyaml>=5
7-
streamlit>=0.86.0, <=0.88.0
7+
streamlit==0.82
88
jinja2
99
plotly
1010
requests

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
url='https://github.com/bigscience-workshop/promptsource.git',
1010
author='Multiple Authors',
1111
author_email='xxx',
12-
python_requires='>=3.7',
12+
python_requires='>=3.7, <3.8',
1313
classifiers=[
1414
'Development Status :: 2 - Pre-Alpha',
1515
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)