spacr 0.3.1__py3-none-any.whl → 0.3.3__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.
- spacr/__init__.py +19 -3
- spacr/cellpose.py +311 -0
- spacr/core.py +245 -2494
- spacr/deep_spacr.py +335 -163
- spacr/gui.py +2 -0
- spacr/gui_core.py +85 -65
- spacr/gui_elements.py +110 -5
- spacr/gui_utils.py +375 -7
- spacr/io.py +680 -141
- spacr/logger.py +28 -9
- spacr/measure.py +108 -133
- spacr/mediar.py +0 -3
- spacr/ml.py +1051 -0
- spacr/openai.py +37 -0
- spacr/plot.py +707 -20
- spacr/resources/data/lopit.csv +3833 -0
- spacr/resources/data/toxoplasma_metadata.csv +8843 -0
- spacr/resources/icons/convert.png +0 -0
- spacr/resources/{models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model → icons/dna_matrix.mp4} +0 -0
- spacr/sequencing.py +241 -1311
- spacr/settings.py +181 -50
- spacr/sim.py +0 -2
- spacr/submodules.py +349 -0
- spacr/timelapse.py +0 -2
- spacr/toxo.py +238 -0
- spacr/utils.py +776 -182
- {spacr-0.3.1.dist-info → spacr-0.3.3.dist-info}/METADATA +31 -22
- {spacr-0.3.1.dist-info → spacr-0.3.3.dist-info}/RECORD +32 -33
- spacr/chris.py +0 -50
- spacr/graph_learning.py +0 -340
- spacr/resources/MEDIAR/.git +0 -1
- spacr/resources/MEDIAR_weights/.DS_Store +0 -0
- spacr/resources/icons/.DS_Store +0 -0
- spacr/resources/icons/spacr_logo_rotation.gif +0 -0
- spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv +0 -23
- spacr/resources/models/cp/toxo_pv_lumen.CP_model +0 -0
- spacr/sim_app.py +0 -0
- {spacr-0.3.1.dist-info → spacr-0.3.3.dist-info}/LICENSE +0 -0
- {spacr-0.3.1.dist-info → spacr-0.3.3.dist-info}/WHEEL +0 -0
- {spacr-0.3.1.dist-info → spacr-0.3.3.dist-info}/entry_points.txt +0 -0
- {spacr-0.3.1.dist-info → spacr-0.3.3.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()
|