Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,4 @@ bundle/
webpack-stats.json

.vscode
config.yaml
58 changes: 0 additions & 58 deletions config.yaml

This file was deleted.

9 changes: 8 additions & 1 deletion doccano_mini/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ def main():
edited_df = st.experimental_data_editor(df, num_rows="dynamic", width=1000)
examples = edited_df.to_dict(orient="records")

# Create prompt
prompt = select_prompt_maker(task)(examples)

st.header("Optional: Edit instruction")
with st.expander("See instruction"):
instruction = st.text_area(label="Instruction", value=prompt.prefix, height=200)
prompt.prefix = instruction

st.header("Test")
text = st.text_area(label="Please enter your text.", value="")
if st.button("Predict"):
prompt = select_prompt_maker(task)(examples)
model_name = os.getenv("OPENAI_MODEL_NAME", "text-davinci-003")
llm = OpenAI(model_name=model_name)
chain = LLMChain(llm=llm, prompt=prompt)
Expand Down