Comments (5)
This is how Streamlit (the framework I'm using for UI) makes a server call. Moving between tabs or selecting another annotation will reload the UI, and changes are lost. I recommend pressing Save, before going to another tab or selecting annotation. Save will store your changes in JSON so they will not be lost. Maybe I should add auto-save functionality.
Yes, your suggestion makes sense, I was thinking about this too. This is on my list of enhancements. Also, I plan to add more automation in the future, for example, some of the fields will be pre-populated with the labels (using OpenAI API).
from sparrow.
I forgot to mentioned this, yes I saved multiple times under the ordering window to be sure that the groupings where saved and it keeps doing this behavior. Thats why I think its an issue, but I don't know if its just happening to me or to everybody, I changed the exporting function for it to group rows when a group finishes with "Items", like: Fees_Items, or Credits_Items, and so on, so that you don't have to create a group for each row like Item_1, Item_2, etc. But I don't know if this is creating the behavior I explained before, this is the function I changed, and I didn't change anything else:
def export_labels(self, model):
path_from = os.path.join("docs/json/")
path_to = os.path.join("docs/json/key/")
files = [f for f in os.listdir(path_from) if not f.startswith('.')]
for file in files:
path = os.path.join(path_from, file)
if os.path.isfile(path):
with open(path, "r") as f:
data = json.load(f)
words = data['words']
keys = {}
key_value_list = [[word['label'], word['value']] for word in words]
labels = set([word['label'] for word in words])
groups = set([label.split(':')[0] for label in labels])
result = {}
for group in groups:
result[group] = []
for key, value in key_value_list:
category, subkey = key.split(':')
if category in result:
result[category].append((subkey, value))
label_dict = {}
for group in groups:
for label in labels:
if label.startswith(group + ':'):
label_dict[label.split(':')[1]] = group
for group in groups:
if 'Items' in group:
keys[group] = []
count = 0
item = {}
for element in result[group]:
for label in labels:
if (label.split(':')[0] == group) and (element[0] == label.split(':')[1]):
count =count+1
item[element[0]] = element[1]
if count == len([label.split(':')[1] for label in labels if label.startswith(group + ':')]):
count=0
keys[group].append(item)
item = {}
else:
keys[group] = {}
for word in words:
for label in label_dict:
if label_dict[word['label'].split(':')[1]] == group:
keys[group][word['label'].split(':')[1]] = word['value']
if keys != {}:
path = os.path.join(path_to, file)
with open(path, "w") as f:
json.dump(keys, f, indent=2)
So this function what it does is just appending an item to the groups that has "Items" in their name, and if they don't have, then it does the normal behavior and it just works if all the fields are labeled and grouped, so I don't see how this could affect what I just described above.
Thanks so much!
from sparrow.
Our team which does data annotation didnt faced the issue you describe. So, may be it is related to your change. Could you revert your change and try?
from sparrow.
Yes, it's because of the change in this function. I don't really get why this function has anything to do with setting up all the groups, but I'll take a closer look at it. Thanks so much!
from sparrow.
Thanks for letting me know.
from sparrow.
Related Issues (20)
- RuntimeError: Failed to import transformers.models.mpnet.modeling_mpnet HOT 3
- Taking a long response time HOT 1
- Long respond time HOT 1
- Error with docker HOT 1
- api/chat not available HOT 5
- Installation Tutorial HOT 1
- Cannot install requirements for sparrow-ml/llm HOT 4
- Model for commercial use HOT 1
- http connection error while using vprocessor HOT 3
- Please help me start the sparrow ocr api. It is not clear from the readme. HOT 1
- Have you seen this issue while installing requirements.txt of sparrow-ocr? HOT 5
- LLM is disabled. Using mock LLM HOT 1
- Model assuming NoneType instead of string. HOT 5
- Haystack giving timeout error HOT 1
- Performance is slow on GPU as well HOT 1
- License and usage clarification HOT 2
- When running Unstructured, { ModuleNotFoundError: No module named 'backoff._typing' } HOT 2
- How to remove validation errors or bypass it to always show result of the values that are found i.e if it didn't find the value for any input it will bypass it and print all the rest response,. HOT 3
- Getting Errors while running sparrow.sh under llm HOT 3
- Error running pip install -r requirements.txt in sparrow-data/ocr HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparrow.