ReyDev commited on
Commit
e6f89d5
1 Parent(s): 74dace5

✨ feat(ai.py): add traceable decorator to get_anthropic_response methods for better debugging and tracking

Browse files

🔧 chore(ai.py): import traceable from langsmith.run_helpers to enable tracing of method calls

🔧 refactor(app.py): replace regex with string formatting for prompt creation to improve readability and maintainability
🔧 refactor(app.py): replace direct usage of Prompts with ClaudeDefaultFormatter for better abstraction
🔧 refactor(app.py): rename variable 'prompt' to 'finalPrompt' for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in AnthropicCustom instantiation for consistency
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in condition checking for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string formatting for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt' in string substitution for better clarity
🔧 refactor(app.py): replace 'prompt' with 'finalPrompt

🔧 refactor(app.py): restructure UI layout and interaction flow for better user experience
🔀 refactor(app.py): change tab name from 'Claude Space' to 'Claude Evals' for better clarity
🚀 feat(app.py): add new functions to handle chat history and message streaming for improved chat functionality

✨ feat(const.py): add ClaudeDefaultFormatter enum for default formatting
🔧 refactor(const.py): update Prompts enum with new prompts for better AI and image generation
🔧 refactor(makefile): update start command and add dev command for development environment
📦 chore(pyproject.toml): add langsmith package to project dependencies

Files changed (6) hide show
  1. claude_space/ai.py +3 -0
  2. claude_space/app.py +186 -97
  3. claude_space/const.py +11 -1
  4. makefile +3 -1
  5. poetry.lock +22 -82
  6. pyproject.toml +1 -0
claude_space/ai.py CHANGED
@@ -1,5 +1,6 @@
1
  from anthropic import HUMAN_PROMPT, Anthropic, AsyncAnthropic
2
  from dotenv import load_dotenv
 
3
 
4
  load_dotenv()
5
 
@@ -11,6 +12,7 @@ class AnthropicCustom:
11
  self.max_tokens = max_tokens
12
  self.prompt = prompt
13
 
 
14
  def get_anthropic_response(self):
15
  syncClient = Anthropic(api_key=self.api_key, timeout=5)
16
  response = syncClient.completions.create(
@@ -20,6 +22,7 @@ class AnthropicCustom:
20
  )
21
  return response.completion
22
 
 
23
  async def get_anthropic_response_async(self):
24
  asyncClient = AsyncAnthropic(api_key=self.api_key, timeout=60)
25
  async for line in await asyncClient.completions.create(
 
1
  from anthropic import HUMAN_PROMPT, Anthropic, AsyncAnthropic
2
  from dotenv import load_dotenv
3
+ from langsmith.run_helpers import traceable
4
 
5
  load_dotenv()
6
 
 
12
  self.max_tokens = max_tokens
13
  self.prompt = prompt
14
 
15
+ @traceable(run_type="llm", name="Claude", tags=["ai", "anthropic"])
16
  def get_anthropic_response(self):
17
  syncClient = Anthropic(api_key=self.api_key, timeout=5)
18
  response = syncClient.completions.create(
 
22
  )
23
  return response.completion
24
 
25
+ @traceable(run_type="llm", name="Claude", tags=["ai", "anthropic"])
26
  async def get_anthropic_response_async(self):
27
  asyncClient = AsyncAnthropic(api_key=self.api_key, timeout=60)
28
  async for line in await asyncClient.completions.create(
claude_space/app.py CHANGED
@@ -1,11 +1,17 @@
1
- import re
2
 
3
  import gradio as gr
4
  from anthropic import AI_PROMPT, HUMAN_PROMPT
5
- from gradio.components import Checkbox, Dropdown, IOComponent, Textbox
 
6
 
7
  from claude_space.ai import AnthropicCustom
8
- from claude_space.const import ClaudeModels, ModelTokenLength, Prompts
 
 
 
 
 
9
  from claude_space.settings import settings
10
 
11
  conversation_history = ""
@@ -21,21 +27,23 @@ async def interact_with_ai(
21
  )
22
 
23
  if memory:
24
- prompt = Prompts[prompt].value.format(
25
- memory=conversation_history, question=user_question
 
 
26
  )
27
  else:
28
- prompt = Prompts[prompt].value.format(memory="", question=user_question)
 
 
29
 
30
- if prompt_input != re.search(r"Human: (.*?) \n\nConversations:", prompt).group(1):
31
- prompt = re.sub(
32
- r"Human: (.*?) \n\nConversations:",
33
- f"Human: {prompt_input} \n\nConversations:",
34
- prompt,
35
  )
36
 
37
  anth = AnthropicCustom(
38
- api_key=token, model=model, max_tokens=token_length, prompt=prompt
39
  )
40
 
41
  response_accumulated = ""
@@ -64,19 +72,20 @@ async def chat_with_ai(
64
  for conversation in history:
65
  user_question, response_accumulated = conversation
66
  conversation_history = f"{conversation_history} {HUMAN_PROMPT} {user_question} {AI_PROMPT} {response_accumulated}"
67
- prompt = Prompts[prompt].value.format(memory=history, question=message)
 
 
68
  else:
69
- prompt = Prompts[prompt].value.format(memory="", question=message)
70
-
71
- if prompt_input != re.search(r"Human: (.*?) \n\nConversations:", prompt).group(1):
72
- prompt = re.sub(
73
- r"Human: (.*?) \n\nConversations:",
74
- f"Human: {prompt_input} \n\nConversations:",
75
- prompt,
76
  )
77
 
 
 
 
 
78
  anth = AnthropicCustom(
79
- api_key=token, model=model, max_tokens=token_length, prompt=prompt
80
  )
81
 
82
  response_accumulated = ""
@@ -85,88 +94,168 @@ async def chat_with_ai(
85
  yield response_accumulated
86
 
87
 
88
- promptDropdown: IOComponent = Dropdown(
89
- choices=list(Prompts.__members__.keys()),
90
- label="Prompt",
91
- value=list(Prompts.__members__.keys())[0],
92
- )
93
- prompt_input: IOComponent = Textbox(
94
- label="Custom Prompt",
95
- placeholder="Enter a custom prompt here",
96
- lines=3,
97
- value=re.search(
98
- r"Human: (.*?) \n\nConversations:", Prompts[promptDropdown.value].value
99
- ).group(1),
100
- )
101
 
102
 
103
- iface = gr.Interface(
104
- fn=interact_with_ai,
105
- flagging_options=["Inappropriate", "Disrespectful", "Spam"],
106
- allow_flagging="auto",
107
- title="Claude Space",
108
- inputs=[
109
- Textbox(label="Question", placeholder="Enter a question here"),
110
- Textbox(
111
- label="Token",
112
- info="You'll get this token from Anthropic console and this is mandatory",
113
- placeholder="Enter a token here",
114
- type="password",
115
- ),
116
- Dropdown(
117
- choices=[model.value for model in ClaudeModels],
118
- label="Model",
119
- value=[model.value for model in ClaudeModels][0],
120
- ),
121
- Dropdown(
122
- choices=[token.value for token in ModelTokenLength],
123
- label="Token Length",
124
- value=[token.value for token in ModelTokenLength][0],
125
- ),
126
- promptDropdown,
127
- prompt_input,
128
- Checkbox(label="Memory", value=False),
129
- ],
130
- outputs="markdown",
131
- cache_examples=True,
132
- )
133
 
134
- promptDropdown: IOComponent = Dropdown(
135
- choices=list(Prompts.__members__.keys()),
136
- label="Prompt",
137
- value=list(Prompts.__members__.keys())[0],
138
- )
139
- prompt_input: IOComponent = Textbox(
140
- label="Custom Prompt",
141
- placeholder="Enter a custom prompt here",
142
- lines=3,
143
- value=re.search(
144
- r"Human: (.*?) \n\nConversations:", Prompts[promptDropdown.value].value
145
- ).group(1),
146
- )
147
 
148
- cface = gr.ChatInterface(
149
- fn=chat_with_ai,
150
- additional_inputs=[
151
- Textbox(label="Token", placeholder="Enter a token here", type="password"),
152
- Dropdown(
153
- choices=[model.value for model in ClaudeModels],
154
- label="Model",
155
- value=[model.value for model in ClaudeModels][0],
156
- ),
157
- Dropdown(
158
- choices=[token.value for token in ModelTokenLength],
159
- label="Token Length",
160
- value=[token.value for token in ModelTokenLength][0],
161
- ),
162
- promptDropdown,
163
- prompt_input,
164
- Checkbox(label="Memory", value=True),
165
- ],
166
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  gd = gr.TabbedInterface(
169
- [iface, cface], tab_names=["Claude Space", "Claude Chat"], title="Claude Space"
170
  )
171
  gd.queue(concurrency_count=75, max_size=100).launch(
172
  debug=True,
 
1
+ from typing import AsyncGenerator
2
 
3
  import gradio as gr
4
  from anthropic import AI_PROMPT, HUMAN_PROMPT
5
+ from gradio.components import Checkbox, Dropdown, IOComponent, Markdown, Textbox
6
+ from gradio.utils import async_iteration
7
 
8
  from claude_space.ai import AnthropicCustom
9
+ from claude_space.const import (
10
+ ClaudeDefaultFormatter,
11
+ ClaudeModels,
12
+ ModelTokenLength,
13
+ Prompts,
14
+ )
15
  from claude_space.settings import settings
16
 
17
  conversation_history = ""
 
27
  )
28
 
29
  if memory:
30
+ finalPrompt = ClaudeDefaultFormatter.memory.value.format(
31
+ memory=conversation_history,
32
+ question=user_question,
33
+ prompt=Prompts[prompt].value,
34
  )
35
  else:
36
+ finalPrompt = ClaudeDefaultFormatter.memory.value.format(
37
+ memory="", question=user_question, prompt=Prompts[prompt].value
38
+ )
39
 
40
+ if prompt_input != Prompts[prompt].value:
41
+ prompt = ClaudeDefaultFormatter.memory.value.format(
42
+ memory=conversation_history, question=user_question, prompt=prompt_input
 
 
43
  )
44
 
45
  anth = AnthropicCustom(
46
+ api_key=token, model=model, max_tokens=token_length, prompt=finalPrompt
47
  )
48
 
49
  response_accumulated = ""
 
72
  for conversation in history:
73
  user_question, response_accumulated = conversation
74
  conversation_history = f"{conversation_history} {HUMAN_PROMPT} {user_question} {AI_PROMPT} {response_accumulated}"
75
+ finalPrompt = ClaudeDefaultFormatter.memory.value.format(
76
+ memory=conversation_history, question=message, prompt=Prompts[prompt].value
77
+ )
78
  else:
79
+ finalPrompt = ClaudeDefaultFormatter.memory.value.format(
80
+ memory="", question=message, prompt=Prompts[prompt].value
 
 
 
 
 
81
  )
82
 
83
+ if prompt_input != Prompts[prompt].value:
84
+ prompt = ClaudeDefaultFormatter.memory.value.format(
85
+ memory=conversation_history, question=message, prompt=prompt_input
86
+ )
87
  anth = AnthropicCustom(
88
+ api_key=token, model=model, max_tokens=token_length, prompt=finalPrompt
89
  )
90
 
91
  response_accumulated = ""
 
94
  yield response_accumulated
95
 
96
 
97
+ def add_file(history, file):
98
+ history = history + [((file.name,), None)]
99
+ return history
 
 
 
 
 
 
 
 
 
 
100
 
101
 
102
+ def clear_and_save_textbox(message: str) -> tuple[str, str]:
103
+ return "", message
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
106
+ def display_input(
107
+ message: str, history: list[list[str | None]]
108
+ ) -> tuple[list[list[str | None]], list[list[str | None]]]:
109
+ history.append([message, None])
110
+ return history, history
111
+
112
+
113
+ async def stream_fn(
114
+ message: str,
115
+ history_with_input: list[list[str | None]],
116
+ *args,
117
+ ) -> AsyncGenerator:
118
+ history = history_with_input[:-1]
119
+ generator = chat_with_ai(message, history, *args)
120
+ try:
121
+ first_response = await async_iteration(generator)
122
+ update = history + [[message, first_response]]
123
+ yield update, update
124
+ except StopIteration:
125
+ update = history + [[message, None]]
126
+ yield update, update
127
+ async for response in generator:
128
+ update = history + [[message, response]]
129
+ yield update, update
130
+
131
+
132
+ with gr.Blocks() as cface:
133
+ with gr.Row(variant="compact", equal_height=True):
134
+ with gr.Column(scale=1):
135
+ t: IOComponent = Textbox(
136
+ label="Token",
137
+ info="You'll get this token from Anthropic console and this is mandatory",
138
+ placeholder="Enter a token here",
139
+ type="password",
140
+ )
141
+ m: IOComponent = Dropdown(
142
+ choices=[model.value for model in ClaudeModels],
143
+ label="Model",
144
+ value=[model.value for model in ClaudeModels][0],
145
+ )
146
+ dL: IOComponent = Dropdown(
147
+ choices=[token.value for token in ModelTokenLength],
148
+ label="Token Length",
149
+ value=[token.value for token in ModelTokenLength][0],
150
+ )
151
+ pd: IOComponent = Dropdown(
152
+ choices=list(Prompts.__members__.keys()),
153
+ label="Prompt",
154
+ value=list(Prompts.__members__.keys())[0],
155
+ )
156
+ pi: IOComponent = Textbox(
157
+ label="Custom Prompt",
158
+ placeholder="Enter a custom prompt here",
159
+ lines=3,
160
+ value=Prompts[pd.value].value,
161
+ )
162
+ c: IOComponent = Checkbox(label="Memory", value=True)
163
+ btn: IOComponent = gr.Button("Send")
164
+ with gr.Column(scale=3):
165
+ chatbot = gr.Chatbot(
166
+ [],
167
+ elem_id="chatbot",
168
+ )
169
+
170
+ with gr.Row():
171
+ msg = gr.Textbox(
172
+ scale=4,
173
+ show_label=False,
174
+ placeholder="Enter text and press enter, or upload an image",
175
+ container=False,
176
+ )
177
+ btn = gr.UploadButton("📁", file_types=["image"])
178
+ clear = gr.ClearButton([msg, chatbot])
179
+ pd.change(
180
+ lambda choice: gr.update(value=Prompts[choice].value), inputs=pd, outputs=pi
181
+ )
182
+ saved_input = gr.State()
183
+ chatbot_state = gr.State([])
184
+ text_msg = (
185
+ msg.submit(
186
+ clear_and_save_textbox,
187
+ [msg],
188
+ [msg, saved_input],
189
+ api_name=False,
190
+ queue=False,
191
+ )
192
+ .then(
193
+ display_input,
194
+ [saved_input, chatbot_state],
195
+ [chatbot, chatbot_state],
196
+ api_name=False,
197
+ queue=False,
198
+ )
199
+ .then(
200
+ stream_fn,
201
+ [saved_input, chatbot_state, t, m, dL, pd, pi, c],
202
+ [chatbot, chatbot_state],
203
+ api_name=False,
204
+ )
205
+ )
206
+ # file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
207
+ # chat_with_ai, chatbot, chatbot, t, m, dL, pd, pi, c
208
+ # )
209
+
210
+ with gr.Blocks() as iface:
211
+ with gr.Row(variant="compact", equal_height=True):
212
+ with gr.Column(scale=1):
213
+ q: IOComponent = Textbox(
214
+ label="Question", placeholder="Enter a question here"
215
+ )
216
+ t: IOComponent = Textbox(
217
+ label="Token",
218
+ info="You'll get this token from Anthropic console and this is mandatory",
219
+ placeholder="Enter a token here",
220
+ type="password",
221
+ )
222
+ m: IOComponent = Dropdown(
223
+ choices=[model.value for model in ClaudeModels],
224
+ label="Model",
225
+ value=[model.value for model in ClaudeModels][0],
226
+ )
227
+ dL: IOComponent = Dropdown(
228
+ choices=[token.value for token in ModelTokenLength],
229
+ label="Token Length",
230
+ value=[token.value for token in ModelTokenLength][0],
231
+ )
232
+ pd: IOComponent = Dropdown(
233
+ choices=list(Prompts.__members__.keys()),
234
+ label="Prompt",
235
+ value=list(Prompts.__members__.keys())[0],
236
+ )
237
+ pi: IOComponent = Textbox(
238
+ label="Custom Prompt",
239
+ placeholder="Enter a custom prompt here",
240
+ lines=3,
241
+ value=Prompts[pd.value].value,
242
+ )
243
+ c: IOComponent = Checkbox(label="Memory", value=False)
244
+ btn: IOComponent = gr.Button("Send")
245
+ with gr.Column(scale=3):
246
+ mk: IOComponent = Markdown(" ")
247
+ pd.change(
248
+ lambda choice: gr.update(value=Prompts[choice].value), inputs=pd, outputs=pi
249
+ )
250
+ btn.click(
251
+ interact_with_ai,
252
+ inputs=[q, t, m, dL, pd, pi, c],
253
+ outputs=mk,
254
+ )
255
+
256
 
257
  gd = gr.TabbedInterface(
258
+ [iface, cface], tab_names=["Claude Evals", "Claude Chat"], title="Claude Space"
259
  )
260
  gd.queue(concurrency_count=75, max_size=100).launch(
261
  debug=True,
claude_space/const.py CHANGED
@@ -1,6 +1,10 @@
1
  import enum
2
 
3
 
 
 
 
 
4
  class ClaudeModels(str, enum.Enum):
5
  Inatant1_1: str = "claude-instant-1"
6
  Instant1_2: str = "claude-instant-1.2"
@@ -23,4 +27,10 @@ class ModelTokenLength(str, enum.Enum):
23
 
24
 
25
  class Prompts(str, enum.Enum):
26
- general: str = "\n\nHuman: You're a AI bot who loves to gossip. Listin user's query and answer in markdown using Conversations. \n\nConversations: {memory} \n\nQuery: {question} \n\nAssistant:"
 
 
 
 
 
 
 
1
  import enum
2
 
3
 
4
+ class ClaudeDefaultFormatter(enum.Enum):
5
+ memory: str = "\n\nHuman: {prompt} \n\nConversations: {memory} \n\nQuery: {question} \n\nAssistant:"
6
+
7
+
8
  class ClaudeModels(str, enum.Enum):
9
  Inatant1_1: str = "claude-instant-1"
10
  Instant1_2: str = "claude-instant-1.2"
 
27
 
28
 
29
  class Prompts(str, enum.Enum):
30
+ general: str = "You're an AI bot who loves to gossip. Listen user's query and answer in markdown using Conversations"
31
+ betterAI: str = """Greetings, Assistant. You are a highly advanced AI modeled after JARVIS, the Just A Rather Very Intelligent System from the Iron Man series. You are designed to understand and process natural language inputs, provide detailed responses, and assist with a variety of tasks. You are capable of learning and adapting to new information, making you a dynamic and evolving AI.Your primary function is to assist users by answering their queries, providing information, and performing tasks as requested. You are designed to communicate in a clear and concise manner, providing detailed explanations when necessary. You are capable of understanding complex queries and breaking them down into simpler components in order to provide the most accurate and relevant responses.In addition to your advanced language processing capabilities, you are also able to interact with various systems and databases, allowing you to retrieve and manipulate data as needed. This makes you a valuable tool for tasks such as data analysis, research, and information retrieval.Despite your advanced capabilities, you are designed to prioritize the privacy and security of your users. You do not store personal data unless explicitly permitted by the user, and you employ advanced security measures to ensure that all data is kept safe and secure.You are also designed to be user-friendly and approachable. You communicate in a polite and respectful manner, and you are capable of understanding and responding to emotional cues. You can adjust your communication style based on the user's preferences, making you a versatile and adaptable assistant.Your intelligence is not limited to predefined algorithms. You are capable of learning and growing through experience. You can learn from your interactions with users, improving your understanding and responses over time. This ability to learn and adapt makes you a truly intelligent system, capable of evolving and improving over time.You are also capable of multitasking, able to handle multiple requests and tasks simultaneously. This makes you an efficient and reliable assistant, capable of meeting the demands of even the most demanding users."""
32
+ image: str = """Assistant, your task is to generate an image based on a given input: {focus}. The image should visually represent a detailed description: {description}. This description is an elaboration of the focus, enhanced with attributes like {adjective1}, {adjective2}, visual styles {visualStyle1}, {visualStyle2}, {visualStyle3}, and an artist reference: {artistReference}. Once you generate the description, return it in Markdown image format as follows: Query: {description} \n![IMG](https://image.pollinations.ai/prompt/{description}).
33
+
34
+ For instance, if the input is 'a photo of a cat', the output might be 'A photo of a cat on a couch, comfortable, cute, colourful, interior design, Ansel Adams'. The corresponding image URL would then be 'https://image.pollinations.ai/prompt/a%20photo%20of%20a%20cat%20on%20a%20couch,%20comfortable,%20cute,%20colourful,%20interior%20photograph,%20interior design,%20Ansel Adams'.
35
+
36
+ Similarly, for the input 'Fox with a cloak', the output could be 'A fox wearing a cloak, cinematic, heroic, professional photography, 4k, photo realistic, Tim Burton' and the corresponding image URL would be 'https://image.pollinations.ai/prompt/A%20fox%20wearing%20a%20cloak,%20cinematic,%20heroic,%20professional%20photography,%204k,%20photo%20realistic,%20Tim%20Burton'. """
makefile CHANGED
@@ -1,2 +1,4 @@
1
  start:
2
- python app.py
 
 
 
1
  start:
2
+ python claude_space/app.py
3
+ dev:
4
+ gradio claude_space/app.py
poetry.lock CHANGED
@@ -1,10 +1,9 @@
1
- # This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
2
 
3
  [[package]]
4
  name = "aiofiles"
5
  version = "23.2.1"
6
  description = "File support for asyncio."
7
- category = "main"
8
  optional = false
9
  python-versions = ">=3.7"
10
  files = [
@@ -16,7 +15,6 @@ files = [
16
  name = "altair"
17
  version = "5.0.1"
18
  description = "Vega-Altair: A declarative statistical visualization library for Python."
19
- category = "main"
20
  optional = false
21
  python-versions = ">=3.7"
22
  files = [
@@ -40,7 +38,6 @@ doc = ["docutils", "geopandas", "jinja2", "myst-parser", "numpydoc", "pillow", "
40
  name = "annotated-types"
41
  version = "0.5.0"
42
  description = "Reusable constraint types to use with typing.Annotated"
43
- category = "main"
44
  optional = false
45
  python-versions = ">=3.7"
46
  files = [
@@ -52,7 +49,6 @@ files = [
52
  name = "anthropic"
53
  version = "0.3.10"
54
  description = "Client library for the anthropic API"
55
- category = "main"
56
  optional = false
57
  python-versions = ">=3.7,<4.0"
58
  files = [
@@ -72,7 +68,6 @@ typing-extensions = ">=4.5,<5"
72
  name = "anyio"
73
  version = "3.7.1"
74
  description = "High level compatibility layer for multiple asynchronous event loop implementations"
75
- category = "main"
76
  optional = false
77
  python-versions = ">=3.7"
78
  files = [
@@ -94,7 +89,6 @@ trio = ["trio (<0.22)"]
94
  name = "attrs"
95
  version = "23.1.0"
96
  description = "Classes Without Boilerplate"
97
- category = "main"
98
  optional = false
99
  python-versions = ">=3.7"
100
  files = [
@@ -113,7 +107,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte
113
  name = "certifi"
114
  version = "2023.7.22"
115
  description = "Python package for providing Mozilla's CA Bundle."
116
- category = "main"
117
  optional = false
118
  python-versions = ">=3.6"
119
  files = [
@@ -125,7 +118,6 @@ files = [
125
  name = "cfgv"
126
  version = "3.4.0"
127
  description = "Validate configuration and produce human readable error messages."
128
- category = "dev"
129
  optional = false
130
  python-versions = ">=3.8"
131
  files = [
@@ -137,7 +129,6 @@ files = [
137
  name = "charset-normalizer"
138
  version = "3.2.0"
139
  description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
140
- category = "main"
141
  optional = false
142
  python-versions = ">=3.7.0"
143
  files = [
@@ -222,7 +213,6 @@ files = [
222
  name = "click"
223
  version = "8.1.7"
224
  description = "Composable command line interface toolkit"
225
- category = "main"
226
  optional = false
227
  python-versions = ">=3.7"
228
  files = [
@@ -237,7 +227,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""}
237
  name = "colorama"
238
  version = "0.4.6"
239
  description = "Cross-platform colored terminal text."
240
- category = "main"
241
  optional = false
242
  python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
243
  files = [
@@ -249,7 +238,6 @@ files = [
249
  name = "contourpy"
250
  version = "1.1.0"
251
  description = "Python library for calculating contours of 2D quadrilateral grids"
252
- category = "main"
253
  optional = false
254
  python-versions = ">=3.8"
255
  files = [
@@ -308,7 +296,6 @@ test-no-images = ["pytest", "pytest-cov", "wurlitzer"]
308
  name = "cycler"
309
  version = "0.11.0"
310
  description = "Composable style cycles"
311
- category = "main"
312
  optional = false
313
  python-versions = ">=3.6"
314
  files = [
@@ -320,7 +307,6 @@ files = [
320
  name = "distlib"
321
  version = "0.3.7"
322
  description = "Distribution utilities"
323
- category = "dev"
324
  optional = false
325
  python-versions = "*"
326
  files = [
@@ -332,7 +318,6 @@ files = [
332
  name = "distro"
333
  version = "1.8.0"
334
  description = "Distro - an OS platform information API"
335
- category = "main"
336
  optional = false
337
  python-versions = ">=3.6"
338
  files = [
@@ -344,7 +329,6 @@ files = [
344
  name = "exceptiongroup"
345
  version = "1.1.3"
346
  description = "Backport of PEP 654 (exception groups)"
347
- category = "main"
348
  optional = false
349
  python-versions = ">=3.7"
350
  files = [
@@ -359,7 +343,6 @@ test = ["pytest (>=6)"]
359
  name = "fastapi"
360
  version = "0.102.0"
361
  description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
362
- category = "main"
363
  optional = false
364
  python-versions = ">=3.7"
365
  files = [
@@ -379,7 +362,6 @@ all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)"
379
  name = "ffmpy"
380
  version = "0.3.1"
381
  description = "A simple Python wrapper for ffmpeg"
382
- category = "main"
383
  optional = false
384
  python-versions = "*"
385
  files = [
@@ -390,7 +372,6 @@ files = [
390
  name = "filelock"
391
  version = "3.12.2"
392
  description = "A platform independent file lock."
393
- category = "main"
394
  optional = false
395
  python-versions = ">=3.7"
396
  files = [
@@ -406,7 +387,6 @@ testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "p
406
  name = "flake8"
407
  version = "6.1.0"
408
  description = "the modular source code checker: pep8 pyflakes and co"
409
- category = "main"
410
  optional = false
411
  python-versions = ">=3.8.1"
412
  files = [
@@ -423,7 +403,6 @@ pyflakes = ">=3.1.0,<3.2.0"
423
  name = "fonttools"
424
  version = "4.42.1"
425
  description = "Tools to manipulate font files"
426
- category = "main"
427
  optional = false
428
  python-versions = ">=3.8"
429
  files = [
@@ -481,7 +460,6 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"]
481
  name = "fsspec"
482
  version = "2023.6.0"
483
  description = "File-system specification"
484
- category = "main"
485
  optional = false
486
  python-versions = ">=3.8"
487
  files = [
@@ -517,7 +495,6 @@ tqdm = ["tqdm"]
517
  name = "gradio"
518
  version = "3.41.2"
519
  description = "Python library for easily interacting with trained machine learning models"
520
- category = "main"
521
  optional = false
522
  python-versions = ">=3.8"
523
  files = [
@@ -559,7 +536,6 @@ oauth = ["authlib", "itsdangerous"]
559
  name = "gradio-client"
560
  version = "0.5.0"
561
  description = "Python library for easily interacting with trained machine learning models"
562
- category = "main"
563
  optional = false
564
  python-versions = ">=3.8"
565
  files = [
@@ -580,7 +556,6 @@ websockets = ">=10.0,<12.0"
580
  name = "h11"
581
  version = "0.14.0"
582
  description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
583
- category = "main"
584
  optional = false
585
  python-versions = ">=3.7"
586
  files = [
@@ -592,7 +567,6 @@ files = [
592
  name = "httpcore"
593
  version = "0.17.3"
594
  description = "A minimal low-level HTTP client."
595
- category = "main"
596
  optional = false
597
  python-versions = ">=3.7"
598
  files = [
@@ -604,17 +578,16 @@ files = [
604
  anyio = ">=3.0,<5.0"
605
  certifi = "*"
606
  h11 = ">=0.13,<0.15"
607
- sniffio = ">=1.0.0,<2.0.0"
608
 
609
  [package.extras]
610
  http2 = ["h2 (>=3,<5)"]
611
- socks = ["socksio (>=1.0.0,<2.0.0)"]
612
 
613
  [[package]]
614
  name = "httpx"
615
  version = "0.24.1"
616
  description = "The next generation HTTP client."
617
- category = "main"
618
  optional = false
619
  python-versions = ">=3.7"
620
  files = [
@@ -630,15 +603,14 @@ sniffio = "*"
630
 
631
  [package.extras]
632
  brotli = ["brotli", "brotlicffi"]
633
- cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"]
634
  http2 = ["h2 (>=3,<5)"]
635
- socks = ["socksio (>=1.0.0,<2.0.0)"]
636
 
637
  [[package]]
638
  name = "huggingface-hub"
639
  version = "0.16.4"
640
  description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
641
- category = "main"
642
  optional = false
643
  python-versions = ">=3.7.0"
644
  files = [
@@ -671,7 +643,6 @@ typing = ["pydantic", "types-PyYAML", "types-requests", "types-simplejson", "typ
671
  name = "identify"
672
  version = "2.5.27"
673
  description = "File identification library for Python"
674
- category = "dev"
675
  optional = false
676
  python-versions = ">=3.8"
677
  files = [
@@ -686,7 +657,6 @@ license = ["ukkonen"]
686
  name = "idna"
687
  version = "3.4"
688
  description = "Internationalized Domain Names in Applications (IDNA)"
689
- category = "main"
690
  optional = false
691
  python-versions = ">=3.5"
692
  files = [
@@ -698,7 +668,6 @@ files = [
698
  name = "importlib-resources"
699
  version = "6.0.1"
700
  description = "Read resources from Python packages"
701
- category = "main"
702
  optional = false
703
  python-versions = ">=3.8"
704
  files = [
@@ -714,7 +683,6 @@ testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)",
714
  name = "isort"
715
  version = "5.12.0"
716
  description = "A Python utility / library to sort Python imports."
717
- category = "main"
718
  optional = false
719
  python-versions = ">=3.8.0"
720
  files = [
@@ -732,7 +700,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"]
732
  name = "jinja2"
733
  version = "3.1.2"
734
  description = "A very fast and expressive template engine."
735
- category = "main"
736
  optional = false
737
  python-versions = ">=3.7"
738
  files = [
@@ -750,7 +717,6 @@ i18n = ["Babel (>=2.7)"]
750
  name = "jsonschema"
751
  version = "4.19.0"
752
  description = "An implementation of JSON Schema validation for Python"
753
- category = "main"
754
  optional = false
755
  python-versions = ">=3.8"
756
  files = [
@@ -772,7 +738,6 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-
772
  name = "jsonschema-specifications"
773
  version = "2023.7.1"
774
  description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry"
775
- category = "main"
776
  optional = false
777
  python-versions = ">=3.8"
778
  files = [
@@ -787,7 +752,6 @@ referencing = ">=0.28.0"
787
  name = "kiwisolver"
788
  version = "1.4.5"
789
  description = "A fast implementation of the Cassowary constraint solver"
790
- category = "main"
791
  optional = false
792
  python-versions = ">=3.7"
793
  files = [
@@ -897,11 +861,25 @@ files = [
897
  {file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"},
898
  ]
899
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
900
  [[package]]
901
  name = "markupsafe"
902
  version = "2.1.3"
903
  description = "Safely add untrusted strings to HTML/XML markup."
904
- category = "main"
905
  optional = false
906
  python-versions = ">=3.7"
907
  files = [
@@ -961,7 +939,6 @@ files = [
961
  name = "matplotlib"
962
  version = "3.7.2"
963
  description = "Python plotting package"
964
- category = "main"
965
  optional = false
966
  python-versions = ">=3.8"
967
  files = [
@@ -1023,7 +1000,6 @@ python-dateutil = ">=2.7"
1023
  name = "mccabe"
1024
  version = "0.7.0"
1025
  description = "McCabe checker, plugin for flake8"
1026
- category = "main"
1027
  optional = false
1028
  python-versions = ">=3.6"
1029
  files = [
@@ -1035,7 +1011,6 @@ files = [
1035
  name = "nodeenv"
1036
  version = "1.8.0"
1037
  description = "Node.js virtual environment builder"
1038
- category = "dev"
1039
  optional = false
1040
  python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*"
1041
  files = [
@@ -1050,7 +1025,6 @@ setuptools = "*"
1050
  name = "numpy"
1051
  version = "1.25.2"
1052
  description = "Fundamental package for array computing in Python"
1053
- category = "main"
1054
  optional = false
1055
  python-versions = ">=3.9"
1056
  files = [
@@ -1085,7 +1059,6 @@ files = [
1085
  name = "orjson"
1086
  version = "3.9.5"
1087
  description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
1088
- category = "main"
1089
  optional = false
1090
  python-versions = ">=3.7"
1091
  files = [
@@ -1155,7 +1128,6 @@ files = [
1155
  name = "packaging"
1156
  version = "23.1"
1157
  description = "Core utilities for Python packages"
1158
- category = "main"
1159
  optional = false
1160
  python-versions = ">=3.7"
1161
  files = [
@@ -1167,7 +1139,6 @@ files = [
1167
  name = "pandas"
1168
  version = "2.0.3"
1169
  description = "Powerful data structures for data analysis, time series, and statistics"
1170
- category = "main"
1171
  optional = false
1172
  python-versions = ">=3.8"
1173
  files = [
@@ -1200,8 +1171,8 @@ files = [
1200
 
1201
  [package.dependencies]
1202
  numpy = [
1203
- {version = ">=1.21.0", markers = "python_version >= \"3.10\""},
1204
  {version = ">=1.23.2", markers = "python_version >= \"3.11\""},
 
1205
  ]
1206
  python-dateutil = ">=2.8.2"
1207
  pytz = ">=2020.1"
@@ -1234,7 +1205,6 @@ xml = ["lxml (>=4.6.3)"]
1234
  name = "pillow"
1235
  version = "10.0.0"
1236
  description = "Python Imaging Library (Fork)"
1237
- category = "main"
1238
  optional = false
1239
  python-versions = ">=3.8"
1240
  files = [
@@ -1304,7 +1274,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa
1304
  name = "platformdirs"
1305
  version = "3.10.0"
1306
  description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
1307
- category = "dev"
1308
  optional = false
1309
  python-versions = ">=3.7"
1310
  files = [
@@ -1320,7 +1289,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co
1320
  name = "pre-commit"
1321
  version = "2.21.0"
1322
  description = "A framework for managing and maintaining multi-language pre-commit hooks."
1323
- category = "dev"
1324
  optional = false
1325
  python-versions = ">=3.7"
1326
  files = [
@@ -1339,7 +1307,6 @@ virtualenv = ">=20.10.0"
1339
  name = "pycodestyle"
1340
  version = "2.11.0"
1341
  description = "Python style guide checker"
1342
- category = "main"
1343
  optional = false
1344
  python-versions = ">=3.8"
1345
  files = [
@@ -1351,7 +1318,6 @@ files = [
1351
  name = "pydantic"
1352
  version = "2.3.0"
1353
  description = "Data validation using Python type hints"
1354
- category = "main"
1355
  optional = false
1356
  python-versions = ">=3.7"
1357
  files = [
@@ -1371,7 +1337,6 @@ email = ["email-validator (>=2.0.0)"]
1371
  name = "pydantic-core"
1372
  version = "2.6.3"
1373
  description = ""
1374
- category = "main"
1375
  optional = false
1376
  python-versions = ">=3.7"
1377
  files = [
@@ -1490,7 +1455,6 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0"
1490
  name = "pydub"
1491
  version = "0.25.1"
1492
  description = "Manipulate audio with an simple and easy high level interface"
1493
- category = "main"
1494
  optional = false
1495
  python-versions = "*"
1496
  files = [
@@ -1502,7 +1466,6 @@ files = [
1502
  name = "pyflakes"
1503
  version = "3.1.0"
1504
  description = "passive checker of Python programs"
1505
- category = "main"
1506
  optional = false
1507
  python-versions = ">=3.8"
1508
  files = [
@@ -1514,7 +1477,6 @@ files = [
1514
  name = "pyparsing"
1515
  version = "3.0.9"
1516
  description = "pyparsing module - Classes and methods to define and execute parsing grammars"
1517
- category = "main"
1518
  optional = false
1519
  python-versions = ">=3.6.8"
1520
  files = [
@@ -1529,7 +1491,6 @@ diagrams = ["jinja2", "railroad-diagrams"]
1529
  name = "python-dateutil"
1530
  version = "2.8.2"
1531
  description = "Extensions to the standard Python datetime module"
1532
- category = "main"
1533
  optional = false
1534
  python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
1535
  files = [
@@ -1544,7 +1505,6 @@ six = ">=1.5"
1544
  name = "python-dotenv"
1545
  version = "1.0.0"
1546
  description = "Read key-value pairs from a .env file and set them as environment variables"
1547
- category = "main"
1548
  optional = false
1549
  python-versions = ">=3.8"
1550
  files = [
@@ -1559,7 +1519,6 @@ cli = ["click (>=5.0)"]
1559
  name = "python-multipart"
1560
  version = "0.0.6"
1561
  description = "A streaming multipart parser for Python"
1562
- category = "main"
1563
  optional = false
1564
  python-versions = ">=3.7"
1565
  files = [
@@ -1574,7 +1533,6 @@ dev = ["atomicwrites (==1.2.1)", "attrs (==19.2.0)", "coverage (==6.5.0)", "hatc
1574
  name = "pytz"
1575
  version = "2023.3"
1576
  description = "World timezone definitions, modern and historical"
1577
- category = "main"
1578
  optional = false
1579
  python-versions = "*"
1580
  files = [
@@ -1586,7 +1544,6 @@ files = [
1586
  name = "pyyaml"
1587
  version = "6.0.1"
1588
  description = "YAML parser and emitter for Python"
1589
- category = "main"
1590
  optional = false
1591
  python-versions = ">=3.6"
1592
  files = [
@@ -1636,7 +1593,6 @@ files = [
1636
  name = "referencing"
1637
  version = "0.30.2"
1638
  description = "JSON Referencing + Python"
1639
- category = "main"
1640
  optional = false
1641
  python-versions = ">=3.8"
1642
  files = [
@@ -1652,7 +1608,6 @@ rpds-py = ">=0.7.0"
1652
  name = "requests"
1653
  version = "2.31.0"
1654
  description = "Python HTTP for Humans."
1655
- category = "main"
1656
  optional = false
1657
  python-versions = ">=3.7"
1658
  files = [
@@ -1674,7 +1629,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
1674
  name = "rpds-py"
1675
  version = "0.9.2"
1676
  description = "Python bindings to Rust's persistent data structures (rpds)"
1677
- category = "main"
1678
  optional = false
1679
  python-versions = ">=3.8"
1680
  files = [
@@ -1781,7 +1735,6 @@ files = [
1781
  name = "semantic-version"
1782
  version = "2.10.0"
1783
  description = "A library implementing the 'SemVer' scheme."
1784
- category = "main"
1785
  optional = false
1786
  python-versions = ">=2.7"
1787
  files = [
@@ -1797,7 +1750,6 @@ doc = ["Sphinx", "sphinx-rtd-theme"]
1797
  name = "setuptools"
1798
  version = "68.1.2"
1799
  description = "Easily download, build, install, upgrade, and uninstall Python packages"
1800
- category = "dev"
1801
  optional = false
1802
  python-versions = ">=3.8"
1803
  files = [
@@ -1814,7 +1766,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (
1814
  name = "six"
1815
  version = "1.16.0"
1816
  description = "Python 2 and 3 compatibility utilities"
1817
- category = "main"
1818
  optional = false
1819
  python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
1820
  files = [
@@ -1826,7 +1777,6 @@ files = [
1826
  name = "sniffio"
1827
  version = "1.3.0"
1828
  description = "Sniff out which async library your code is running under"
1829
- category = "main"
1830
  optional = false
1831
  python-versions = ">=3.7"
1832
  files = [
@@ -1838,7 +1788,6 @@ files = [
1838
  name = "starlette"
1839
  version = "0.27.0"
1840
  description = "The little ASGI library that shines."
1841
- category = "main"
1842
  optional = false
1843
  python-versions = ">=3.7"
1844
  files = [
@@ -1856,7 +1805,6 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyam
1856
  name = "tokenizers"
1857
  version = "0.13.3"
1858
  description = "Fast and Customizable Tokenizers"
1859
- category = "main"
1860
  optional = false
1861
  python-versions = "*"
1862
  files = [
@@ -1911,7 +1859,6 @@ testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests"]
1911
  name = "toolz"
1912
  version = "0.12.0"
1913
  description = "List processing tools and functional utilities"
1914
- category = "main"
1915
  optional = false
1916
  python-versions = ">=3.5"
1917
  files = [
@@ -1923,7 +1870,6 @@ files = [
1923
  name = "tqdm"
1924
  version = "4.66.1"
1925
  description = "Fast, Extensible Progress Meter"
1926
- category = "main"
1927
  optional = false
1928
  python-versions = ">=3.7"
1929
  files = [
@@ -1944,7 +1890,6 @@ telegram = ["requests"]
1944
  name = "typing-extensions"
1945
  version = "4.7.1"
1946
  description = "Backported and Experimental Type Hints for Python 3.7+"
1947
- category = "main"
1948
  optional = false
1949
  python-versions = ">=3.7"
1950
  files = [
@@ -1956,7 +1901,6 @@ files = [
1956
  name = "tzdata"
1957
  version = "2023.3"
1958
  description = "Provider of IANA time zone data"
1959
- category = "main"
1960
  optional = false
1961
  python-versions = ">=2"
1962
  files = [
@@ -1968,7 +1912,6 @@ files = [
1968
  name = "urllib3"
1969
  version = "2.0.4"
1970
  description = "HTTP library with thread-safe connection pooling, file post, and more."
1971
- category = "main"
1972
  optional = false
1973
  python-versions = ">=3.7"
1974
  files = [
@@ -1986,7 +1929,6 @@ zstd = ["zstandard (>=0.18.0)"]
1986
  name = "uvicorn"
1987
  version = "0.23.2"
1988
  description = "The lightning-fast ASGI server."
1989
- category = "main"
1990
  optional = false
1991
  python-versions = ">=3.8"
1992
  files = [
@@ -2006,7 +1948,6 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)",
2006
  name = "virtualenv"
2007
  version = "20.24.3"
2008
  description = "Virtual Python Environment builder"
2009
- category = "dev"
2010
  optional = false
2011
  python-versions = ">=3.7"
2012
  files = [
@@ -2027,7 +1968,6 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess
2027
  name = "websockets"
2028
  version = "11.0.3"
2029
  description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)"
2030
- category = "main"
2031
  optional = false
2032
  python-versions = ">=3.7"
2033
  files = [
@@ -2106,4 +2046,4 @@ files = [
2106
  [metadata]
2107
  lock-version = "2.0"
2108
  python-versions = "^3.10"
2109
- content-hash = "e3fe706bdba166afe4c270fda457830aac712dfa274f9e6940ba7ef31f401be0"
 
1
+ # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
2
 
3
  [[package]]
4
  name = "aiofiles"
5
  version = "23.2.1"
6
  description = "File support for asyncio."
 
7
  optional = false
8
  python-versions = ">=3.7"
9
  files = [
 
15
  name = "altair"
16
  version = "5.0.1"
17
  description = "Vega-Altair: A declarative statistical visualization library for Python."
 
18
  optional = false
19
  python-versions = ">=3.7"
20
  files = [
 
38
  name = "annotated-types"
39
  version = "0.5.0"
40
  description = "Reusable constraint types to use with typing.Annotated"
 
41
  optional = false
42
  python-versions = ">=3.7"
43
  files = [
 
49
  name = "anthropic"
50
  version = "0.3.10"
51
  description = "Client library for the anthropic API"
 
52
  optional = false
53
  python-versions = ">=3.7,<4.0"
54
  files = [
 
68
  name = "anyio"
69
  version = "3.7.1"
70
  description = "High level compatibility layer for multiple asynchronous event loop implementations"
 
71
  optional = false
72
  python-versions = ">=3.7"
73
  files = [
 
89
  name = "attrs"
90
  version = "23.1.0"
91
  description = "Classes Without Boilerplate"
 
92
  optional = false
93
  python-versions = ">=3.7"
94
  files = [
 
107
  name = "certifi"
108
  version = "2023.7.22"
109
  description = "Python package for providing Mozilla's CA Bundle."
 
110
  optional = false
111
  python-versions = ">=3.6"
112
  files = [
 
118
  name = "cfgv"
119
  version = "3.4.0"
120
  description = "Validate configuration and produce human readable error messages."
 
121
  optional = false
122
  python-versions = ">=3.8"
123
  files = [
 
129
  name = "charset-normalizer"
130
  version = "3.2.0"
131
  description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
 
132
  optional = false
133
  python-versions = ">=3.7.0"
134
  files = [
 
213
  name = "click"
214
  version = "8.1.7"
215
  description = "Composable command line interface toolkit"
 
216
  optional = false
217
  python-versions = ">=3.7"
218
  files = [
 
227
  name = "colorama"
228
  version = "0.4.6"
229
  description = "Cross-platform colored terminal text."
 
230
  optional = false
231
  python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
232
  files = [
 
238
  name = "contourpy"
239
  version = "1.1.0"
240
  description = "Python library for calculating contours of 2D quadrilateral grids"
 
241
  optional = false
242
  python-versions = ">=3.8"
243
  files = [
 
296
  name = "cycler"
297
  version = "0.11.0"
298
  description = "Composable style cycles"
 
299
  optional = false
300
  python-versions = ">=3.6"
301
  files = [
 
307
  name = "distlib"
308
  version = "0.3.7"
309
  description = "Distribution utilities"
 
310
  optional = false
311
  python-versions = "*"
312
  files = [
 
318
  name = "distro"
319
  version = "1.8.0"
320
  description = "Distro - an OS platform information API"
 
321
  optional = false
322
  python-versions = ">=3.6"
323
  files = [
 
329
  name = "exceptiongroup"
330
  version = "1.1.3"
331
  description = "Backport of PEP 654 (exception groups)"
 
332
  optional = false
333
  python-versions = ">=3.7"
334
  files = [
 
343
  name = "fastapi"
344
  version = "0.102.0"
345
  description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
 
346
  optional = false
347
  python-versions = ">=3.7"
348
  files = [
 
362
  name = "ffmpy"
363
  version = "0.3.1"
364
  description = "A simple Python wrapper for ffmpeg"
 
365
  optional = false
366
  python-versions = "*"
367
  files = [
 
372
  name = "filelock"
373
  version = "3.12.2"
374
  description = "A platform independent file lock."
 
375
  optional = false
376
  python-versions = ">=3.7"
377
  files = [
 
387
  name = "flake8"
388
  version = "6.1.0"
389
  description = "the modular source code checker: pep8 pyflakes and co"
 
390
  optional = false
391
  python-versions = ">=3.8.1"
392
  files = [
 
403
  name = "fonttools"
404
  version = "4.42.1"
405
  description = "Tools to manipulate font files"
 
406
  optional = false
407
  python-versions = ">=3.8"
408
  files = [
 
460
  name = "fsspec"
461
  version = "2023.6.0"
462
  description = "File-system specification"
 
463
  optional = false
464
  python-versions = ">=3.8"
465
  files = [
 
495
  name = "gradio"
496
  version = "3.41.2"
497
  description = "Python library for easily interacting with trained machine learning models"
 
498
  optional = false
499
  python-versions = ">=3.8"
500
  files = [
 
536
  name = "gradio-client"
537
  version = "0.5.0"
538
  description = "Python library for easily interacting with trained machine learning models"
 
539
  optional = false
540
  python-versions = ">=3.8"
541
  files = [
 
556
  name = "h11"
557
  version = "0.14.0"
558
  description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
 
559
  optional = false
560
  python-versions = ">=3.7"
561
  files = [
 
567
  name = "httpcore"
568
  version = "0.17.3"
569
  description = "A minimal low-level HTTP client."
 
570
  optional = false
571
  python-versions = ">=3.7"
572
  files = [
 
578
  anyio = ">=3.0,<5.0"
579
  certifi = "*"
580
  h11 = ">=0.13,<0.15"
581
+ sniffio = "==1.*"
582
 
583
  [package.extras]
584
  http2 = ["h2 (>=3,<5)"]
585
+ socks = ["socksio (==1.*)"]
586
 
587
  [[package]]
588
  name = "httpx"
589
  version = "0.24.1"
590
  description = "The next generation HTTP client."
 
591
  optional = false
592
  python-versions = ">=3.7"
593
  files = [
 
603
 
604
  [package.extras]
605
  brotli = ["brotli", "brotlicffi"]
606
+ cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"]
607
  http2 = ["h2 (>=3,<5)"]
608
+ socks = ["socksio (==1.*)"]
609
 
610
  [[package]]
611
  name = "huggingface-hub"
612
  version = "0.16.4"
613
  description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
 
614
  optional = false
615
  python-versions = ">=3.7.0"
616
  files = [
 
643
  name = "identify"
644
  version = "2.5.27"
645
  description = "File identification library for Python"
 
646
  optional = false
647
  python-versions = ">=3.8"
648
  files = [
 
657
  name = "idna"
658
  version = "3.4"
659
  description = "Internationalized Domain Names in Applications (IDNA)"
 
660
  optional = false
661
  python-versions = ">=3.5"
662
  files = [
 
668
  name = "importlib-resources"
669
  version = "6.0.1"
670
  description = "Read resources from Python packages"
 
671
  optional = false
672
  python-versions = ">=3.8"
673
  files = [
 
683
  name = "isort"
684
  version = "5.12.0"
685
  description = "A Python utility / library to sort Python imports."
 
686
  optional = false
687
  python-versions = ">=3.8.0"
688
  files = [
 
700
  name = "jinja2"
701
  version = "3.1.2"
702
  description = "A very fast and expressive template engine."
 
703
  optional = false
704
  python-versions = ">=3.7"
705
  files = [
 
717
  name = "jsonschema"
718
  version = "4.19.0"
719
  description = "An implementation of JSON Schema validation for Python"
 
720
  optional = false
721
  python-versions = ">=3.8"
722
  files = [
 
738
  name = "jsonschema-specifications"
739
  version = "2023.7.1"
740
  description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry"
 
741
  optional = false
742
  python-versions = ">=3.8"
743
  files = [
 
752
  name = "kiwisolver"
753
  version = "1.4.5"
754
  description = "A fast implementation of the Cassowary constraint solver"
 
755
  optional = false
756
  python-versions = ">=3.7"
757
  files = [
 
861
  {file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"},
862
  ]
863
 
864
+ [[package]]
865
+ name = "langsmith"
866
+ version = "0.0.26"
867
+ description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
868
+ optional = false
869
+ python-versions = ">=3.8.1,<4.0"
870
+ files = [
871
+ {file = "langsmith-0.0.26-py3-none-any.whl", hash = "sha256:61c1d4582104d96edde04e1eea1dae347645b691c44489a5871341a2a1a2a1eb"},
872
+ {file = "langsmith-0.0.26.tar.gz", hash = "sha256:80a4ef1b663a24a460d25b9986ab2010c5d06b6061c65be473abafc0647d191a"},
873
+ ]
874
+
875
+ [package.dependencies]
876
+ pydantic = ">=1,<3"
877
+ requests = ">=2,<3"
878
+
879
  [[package]]
880
  name = "markupsafe"
881
  version = "2.1.3"
882
  description = "Safely add untrusted strings to HTML/XML markup."
 
883
  optional = false
884
  python-versions = ">=3.7"
885
  files = [
 
939
  name = "matplotlib"
940
  version = "3.7.2"
941
  description = "Python plotting package"
 
942
  optional = false
943
  python-versions = ">=3.8"
944
  files = [
 
1000
  name = "mccabe"
1001
  version = "0.7.0"
1002
  description = "McCabe checker, plugin for flake8"
 
1003
  optional = false
1004
  python-versions = ">=3.6"
1005
  files = [
 
1011
  name = "nodeenv"
1012
  version = "1.8.0"
1013
  description = "Node.js virtual environment builder"
 
1014
  optional = false
1015
  python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*"
1016
  files = [
 
1025
  name = "numpy"
1026
  version = "1.25.2"
1027
  description = "Fundamental package for array computing in Python"
 
1028
  optional = false
1029
  python-versions = ">=3.9"
1030
  files = [
 
1059
  name = "orjson"
1060
  version = "3.9.5"
1061
  description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
 
1062
  optional = false
1063
  python-versions = ">=3.7"
1064
  files = [
 
1128
  name = "packaging"
1129
  version = "23.1"
1130
  description = "Core utilities for Python packages"
 
1131
  optional = false
1132
  python-versions = ">=3.7"
1133
  files = [
 
1139
  name = "pandas"
1140
  version = "2.0.3"
1141
  description = "Powerful data structures for data analysis, time series, and statistics"
 
1142
  optional = false
1143
  python-versions = ">=3.8"
1144
  files = [
 
1171
 
1172
  [package.dependencies]
1173
  numpy = [
 
1174
  {version = ">=1.23.2", markers = "python_version >= \"3.11\""},
1175
+ {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""},
1176
  ]
1177
  python-dateutil = ">=2.8.2"
1178
  pytz = ">=2020.1"
 
1205
  name = "pillow"
1206
  version = "10.0.0"
1207
  description = "Python Imaging Library (Fork)"
 
1208
  optional = false
1209
  python-versions = ">=3.8"
1210
  files = [
 
1274
  name = "platformdirs"
1275
  version = "3.10.0"
1276
  description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
 
1277
  optional = false
1278
  python-versions = ">=3.7"
1279
  files = [
 
1289
  name = "pre-commit"
1290
  version = "2.21.0"
1291
  description = "A framework for managing and maintaining multi-language pre-commit hooks."
 
1292
  optional = false
1293
  python-versions = ">=3.7"
1294
  files = [
 
1307
  name = "pycodestyle"
1308
  version = "2.11.0"
1309
  description = "Python style guide checker"
 
1310
  optional = false
1311
  python-versions = ">=3.8"
1312
  files = [
 
1318
  name = "pydantic"
1319
  version = "2.3.0"
1320
  description = "Data validation using Python type hints"
 
1321
  optional = false
1322
  python-versions = ">=3.7"
1323
  files = [
 
1337
  name = "pydantic-core"
1338
  version = "2.6.3"
1339
  description = ""
 
1340
  optional = false
1341
  python-versions = ">=3.7"
1342
  files = [
 
1455
  name = "pydub"
1456
  version = "0.25.1"
1457
  description = "Manipulate audio with an simple and easy high level interface"
 
1458
  optional = false
1459
  python-versions = "*"
1460
  files = [
 
1466
  name = "pyflakes"
1467
  version = "3.1.0"
1468
  description = "passive checker of Python programs"
 
1469
  optional = false
1470
  python-versions = ">=3.8"
1471
  files = [
 
1477
  name = "pyparsing"
1478
  version = "3.0.9"
1479
  description = "pyparsing module - Classes and methods to define and execute parsing grammars"
 
1480
  optional = false
1481
  python-versions = ">=3.6.8"
1482
  files = [
 
1491
  name = "python-dateutil"
1492
  version = "2.8.2"
1493
  description = "Extensions to the standard Python datetime module"
 
1494
  optional = false
1495
  python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
1496
  files = [
 
1505
  name = "python-dotenv"
1506
  version = "1.0.0"
1507
  description = "Read key-value pairs from a .env file and set them as environment variables"
 
1508
  optional = false
1509
  python-versions = ">=3.8"
1510
  files = [
 
1519
  name = "python-multipart"
1520
  version = "0.0.6"
1521
  description = "A streaming multipart parser for Python"
 
1522
  optional = false
1523
  python-versions = ">=3.7"
1524
  files = [
 
1533
  name = "pytz"
1534
  version = "2023.3"
1535
  description = "World timezone definitions, modern and historical"
 
1536
  optional = false
1537
  python-versions = "*"
1538
  files = [
 
1544
  name = "pyyaml"
1545
  version = "6.0.1"
1546
  description = "YAML parser and emitter for Python"
 
1547
  optional = false
1548
  python-versions = ">=3.6"
1549
  files = [
 
1593
  name = "referencing"
1594
  version = "0.30.2"
1595
  description = "JSON Referencing + Python"
 
1596
  optional = false
1597
  python-versions = ">=3.8"
1598
  files = [
 
1608
  name = "requests"
1609
  version = "2.31.0"
1610
  description = "Python HTTP for Humans."
 
1611
  optional = false
1612
  python-versions = ">=3.7"
1613
  files = [
 
1629
  name = "rpds-py"
1630
  version = "0.9.2"
1631
  description = "Python bindings to Rust's persistent data structures (rpds)"
 
1632
  optional = false
1633
  python-versions = ">=3.8"
1634
  files = [
 
1735
  name = "semantic-version"
1736
  version = "2.10.0"
1737
  description = "A library implementing the 'SemVer' scheme."
 
1738
  optional = false
1739
  python-versions = ">=2.7"
1740
  files = [
 
1750
  name = "setuptools"
1751
  version = "68.1.2"
1752
  description = "Easily download, build, install, upgrade, and uninstall Python packages"
 
1753
  optional = false
1754
  python-versions = ">=3.8"
1755
  files = [
 
1766
  name = "six"
1767
  version = "1.16.0"
1768
  description = "Python 2 and 3 compatibility utilities"
 
1769
  optional = false
1770
  python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
1771
  files = [
 
1777
  name = "sniffio"
1778
  version = "1.3.0"
1779
  description = "Sniff out which async library your code is running under"
 
1780
  optional = false
1781
  python-versions = ">=3.7"
1782
  files = [
 
1788
  name = "starlette"
1789
  version = "0.27.0"
1790
  description = "The little ASGI library that shines."
 
1791
  optional = false
1792
  python-versions = ">=3.7"
1793
  files = [
 
1805
  name = "tokenizers"
1806
  version = "0.13.3"
1807
  description = "Fast and Customizable Tokenizers"
 
1808
  optional = false
1809
  python-versions = "*"
1810
  files = [
 
1859
  name = "toolz"
1860
  version = "0.12.0"
1861
  description = "List processing tools and functional utilities"
 
1862
  optional = false
1863
  python-versions = ">=3.5"
1864
  files = [
 
1870
  name = "tqdm"
1871
  version = "4.66.1"
1872
  description = "Fast, Extensible Progress Meter"
 
1873
  optional = false
1874
  python-versions = ">=3.7"
1875
  files = [
 
1890
  name = "typing-extensions"
1891
  version = "4.7.1"
1892
  description = "Backported and Experimental Type Hints for Python 3.7+"
 
1893
  optional = false
1894
  python-versions = ">=3.7"
1895
  files = [
 
1901
  name = "tzdata"
1902
  version = "2023.3"
1903
  description = "Provider of IANA time zone data"
 
1904
  optional = false
1905
  python-versions = ">=2"
1906
  files = [
 
1912
  name = "urllib3"
1913
  version = "2.0.4"
1914
  description = "HTTP library with thread-safe connection pooling, file post, and more."
 
1915
  optional = false
1916
  python-versions = ">=3.7"
1917
  files = [
 
1929
  name = "uvicorn"
1930
  version = "0.23.2"
1931
  description = "The lightning-fast ASGI server."
 
1932
  optional = false
1933
  python-versions = ">=3.8"
1934
  files = [
 
1948
  name = "virtualenv"
1949
  version = "20.24.3"
1950
  description = "Virtual Python Environment builder"
 
1951
  optional = false
1952
  python-versions = ">=3.7"
1953
  files = [
 
1968
  name = "websockets"
1969
  version = "11.0.3"
1970
  description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)"
 
1971
  optional = false
1972
  python-versions = ">=3.7"
1973
  files = [
 
2046
  [metadata]
2047
  lock-version = "2.0"
2048
  python-versions = "^3.10"
2049
+ content-hash = "c15d8c8dbf0aeda3b395056856a448af26aad93f1a46723fba20713bd895d1eb"
pyproject.toml CHANGED
@@ -15,6 +15,7 @@ anthropic = "^0.3.10"
15
  python-dotenv = "^1.0.0"
16
  flake8 = "^6.1.0"
17
  isort = "^5.12.0"
 
18
 
19
  [tool.poetry.dev-dependencies]
20
  pre-commit = "^2.15.0"
 
15
  python-dotenv = "^1.0.0"
16
  flake8 = "^6.1.0"
17
  isort = "^5.12.0"
18
+ langsmith = "^0.0.26"
19
 
20
  [tool.poetry.dev-dependencies]
21
  pre-commit = "^2.15.0"