spacr 0.3.1__py3-none-any.whl → 0.3.22__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. spacr/__init__.py +19 -3
  2. spacr/cellpose.py +311 -0
  3. spacr/core.py +245 -2494
  4. spacr/deep_spacr.py +316 -48
  5. spacr/gui.py +1 -0
  6. spacr/gui_core.py +74 -63
  7. spacr/gui_elements.py +110 -5
  8. spacr/gui_utils.py +346 -6
  9. spacr/io.py +680 -141
  10. spacr/logger.py +28 -9
  11. spacr/measure.py +107 -95
  12. spacr/mediar.py +0 -3
  13. spacr/ml.py +1051 -0
  14. spacr/openai.py +37 -0
  15. spacr/plot.py +707 -20
  16. spacr/resources/data/lopit.csv +3833 -0
  17. spacr/resources/data/toxoplasma_metadata.csv +8843 -0
  18. spacr/resources/icons/convert.png +0 -0
  19. spacr/resources/{models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model → icons/dna_matrix.mp4} +0 -0
  20. spacr/sequencing.py +241 -1311
  21. spacr/settings.py +134 -47
  22. spacr/sim.py +0 -2
  23. spacr/submodules.py +349 -0
  24. spacr/timelapse.py +0 -2
  25. spacr/toxo.py +238 -0
  26. spacr/utils.py +419 -180
  27. {spacr-0.3.1.dist-info → spacr-0.3.22.dist-info}/METADATA +31 -22
  28. {spacr-0.3.1.dist-info → spacr-0.3.22.dist-info}/RECORD +32 -33
  29. spacr/chris.py +0 -50
  30. spacr/graph_learning.py +0 -340
  31. spacr/resources/MEDIAR/.git +0 -1
  32. spacr/resources/MEDIAR_weights/.DS_Store +0 -0
  33. spacr/resources/icons/.DS_Store +0 -0
  34. spacr/resources/icons/spacr_logo_rotation.gif +0 -0
  35. spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv +0 -23
  36. spacr/resources/models/cp/toxo_pv_lumen.CP_model +0 -0
  37. spacr/sim_app.py +0 -0
  38. {spacr-0.3.1.dist-info → spacr-0.3.22.dist-info}/LICENSE +0 -0
  39. {spacr-0.3.1.dist-info → spacr-0.3.22.dist-info}/WHEEL +0 -0
  40. {spacr-0.3.1.dist-info → spacr-0.3.22.dist-info}/entry_points.txt +0 -0
  41. {spacr-0.3.1.dist-info → spacr-0.3.22.dist-info}/top_level.txt +0 -0
spacr/openai.py ADDED
@@ -0,0 +1,37 @@
1
+ #from openai import OpenAI, APIError, OpenAIError
2
+ #import openai
3
+ #
4
+ #class Chatbot:
5
+ # def __init__(self, api_key):
6
+ # openai.api_key = api_key
7
+ #
8
+ # def ask_question(self, question):
9
+ # try:
10
+ # # Sending the request to the gpt-4o-mini model
11
+ # response = openai.chat.completions.create(
12
+ # model="gpt-3.5-turbo", # Correct model name for your setup
13
+ # messages=[
14
+ # {"role": "user", "content": question}
15
+ # ],
16
+ # max_tokens=150
17
+ # )
18
+ # # Extracting the response from the model and returning it
19
+ # return response.choices[0].message['content'].strip()
20
+ # except (APIError, OpenAIError) as e:
21
+ # return f"Error: {str(e)}"
22
+ #
23
+ #def list_available_models():
24
+ # try:
25
+ # # List available models
26
+ # models = openai.models.list()
27
+ #
28
+ # # Iterate through models directly
29
+ # for model in models:
30
+ # print(model.id) # Print the model ID
31
+ # except (APIError, OpenAIError) as e:
32
+ # print(f"Error: {str(e)}")
33
+
34
+ # Replace with your actual API key or ensure it's set as an environment variable
35
+
36
+ #openai.api_key = api_key
37
+ #list_available_models()