Upload 151 files
Browse files- 06f15523-2eb9-4269-b9aa-b4399fe864a0.png +3 -0
- 1663d19f-2b5a-4417-9ec6-0484256f288a.png +3 -0
- 4644dc7c-254e-454e-b80e-2c5196e29756.png +3 -0
- 4d49e77c-734c-469a-9baf-83bbb60ee623.png +3 -0
- 651e6fca-31d2-4e7d-bd07-8930ba48fb17.png +3 -0
- 671ef76a-7d26-431c-aa5c-cdf86a98ca3d.png +3 -0
- 6732d021-02cf-4351-a5c6-7e8b10869ac4.png +3 -0
- 94a57345-7ff3-4eee-bdbe-24265d8ba41b.png +3 -0
- b7cce6e2-e6d4-461f-888b-6373790d2fef.png +3 -0
- b8540c6d-1e87-47fc-94ee-d7a88a1357f4.png +3 -0
- bd946ac6-ec8c-4eb7-8a99-35efb0124030.png +3 -0
- ccdaa8c9-81dc-498a-9046-721417fb0ed3.png +3 -0
- e90744fe-7903-4e1a-ac5a-9d20c33141ca.png +3 -0
- f2826d96-90ea-4cfc-88a4-a583d653f6e1.png +3 -0
- f28cb5a0-9737-47f2-ba41-3e44e13e135c.png +3 -0
- f41c87d8-b0ea-4870-bd06-9af3c653e6de.png +3 -0
- metadata.jsonl +16 -0
06f15523-2eb9-4269-b9aa-b4399fe864a0.png
ADDED
Git LFS Details
|
1663d19f-2b5a-4417-9ec6-0484256f288a.png
ADDED
Git LFS Details
|
4644dc7c-254e-454e-b80e-2c5196e29756.png
ADDED
Git LFS Details
|
4d49e77c-734c-469a-9baf-83bbb60ee623.png
ADDED
Git LFS Details
|
651e6fca-31d2-4e7d-bd07-8930ba48fb17.png
ADDED
Git LFS Details
|
671ef76a-7d26-431c-aa5c-cdf86a98ca3d.png
ADDED
Git LFS Details
|
6732d021-02cf-4351-a5c6-7e8b10869ac4.png
ADDED
Git LFS Details
|
94a57345-7ff3-4eee-bdbe-24265d8ba41b.png
ADDED
Git LFS Details
|
b7cce6e2-e6d4-461f-888b-6373790d2fef.png
ADDED
Git LFS Details
|
b8540c6d-1e87-47fc-94ee-d7a88a1357f4.png
ADDED
Git LFS Details
|
bd946ac6-ec8c-4eb7-8a99-35efb0124030.png
ADDED
Git LFS Details
|
ccdaa8c9-81dc-498a-9046-721417fb0ed3.png
ADDED
Git LFS Details
|
e90744fe-7903-4e1a-ac5a-9d20c33141ca.png
ADDED
Git LFS Details
|
f2826d96-90ea-4cfc-88a4-a583d653f6e1.png
ADDED
Git LFS Details
|
f28cb5a0-9737-47f2-ba41-3e44e13e135c.png
ADDED
Git LFS Details
|
f41c87d8-b0ea-4870-bd06-9af3c653e6de.png
ADDED
Git LFS Details
|
metadata.jsonl
CHANGED
@@ -132,3 +132,19 @@
|
|
132 |
{"file_name": "ca33b991-977a-4b3d-9bae-5b8671c8e5c6.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from datetime import datetime\r\n\r\nfrom sqlalchemy import ForeignKey\r\nfrom sqlalchemy.orm import Mapped, mapped_column, relationship\r\n\r\nfrom ..database import Base\r\n\r\n\r\nclass Post(Base):\r\n __tablename__ = \"posts\"\r\n\r\n id: Mapped[str] = mapped_column(primary_key=True)\r\n author_id: Mapped[str] = mapped_column(ForeignKey(\"users.id\"))\r\n location: Mapped[str]\r\n text: Mapped[str]\r\n image_url: Mapped[str]\r\n date_published: Mapped[datetime] = mapped_column(default_factory=datetime.utcnow)\r\n date_updated: Mapped[datetime] = mapped_column(\r\n onupdate=datetime.utcnow, default_factory=datetime.utcnow\r\n )\r\n\r\n author = relationship(\"User\", back_populates=\"posts\")\r\n bookmarks = relationship(\"Bookmark\", back_populates=\"post\")\r\n likes = relationship(\"Like\", back_populates=\"post\")\r\n comments = relationship(\"Comment\", back_populates=\"post\")\r\n views = relationship(\"View\", back_populates=\"post\")\r\n"}]}
|
133 |
{"file_name": "404e2ab5-6feb-4531-81f0-9ac6edd14064.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from .bookmark import Bookmark\r\nfrom .comment import Comment\r\nfrom .like import Like\r\nfrom .post import Post\r\nfrom .user import User\r\nfrom .view import View\r\n"}]}
|
134 |
{"file_name": "d874be25-1ac6-4b36-8272-cbb5428ab3e9.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from datetime import datetime\r\n\r\nfrom sqlalchemy import ForeignKey\r\nfrom sqlalchemy.orm import Mapped, mapped_column, relationship\r\n\r\nfrom ..database import Base\r\n\r\n\r\nclass View(Base):\r\n __tablename__ = \"views\"\r\n\r\n id: Mapped[str] = mapped_column(primary_key=True)\r\n author_id: Mapped[str] = mapped_column(ForeignKey(\"users.id\"))\r\n post_id: Mapped[str] = mapped_column(ForeignKey(\"posts.id\"))\r\n view_date: Mapped[datetime] = mapped_column(default_factory=datetime.utcnow)\r\n\r\n author = relationship(\"User\", back_populates=\"views\")\r\n post = relationship(\"Post\", back_populates=\"views\")\r\n"}]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
{"file_name": "ca33b991-977a-4b3d-9bae-5b8671c8e5c6.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from datetime import datetime\r\n\r\nfrom sqlalchemy import ForeignKey\r\nfrom sqlalchemy.orm import Mapped, mapped_column, relationship\r\n\r\nfrom ..database import Base\r\n\r\n\r\nclass Post(Base):\r\n __tablename__ = \"posts\"\r\n\r\n id: Mapped[str] = mapped_column(primary_key=True)\r\n author_id: Mapped[str] = mapped_column(ForeignKey(\"users.id\"))\r\n location: Mapped[str]\r\n text: Mapped[str]\r\n image_url: Mapped[str]\r\n date_published: Mapped[datetime] = mapped_column(default_factory=datetime.utcnow)\r\n date_updated: Mapped[datetime] = mapped_column(\r\n onupdate=datetime.utcnow, default_factory=datetime.utcnow\r\n )\r\n\r\n author = relationship(\"User\", back_populates=\"posts\")\r\n bookmarks = relationship(\"Bookmark\", back_populates=\"post\")\r\n likes = relationship(\"Like\", back_populates=\"post\")\r\n comments = relationship(\"Comment\", back_populates=\"post\")\r\n views = relationship(\"View\", back_populates=\"post\")\r\n"}]}
|
133 |
{"file_name": "404e2ab5-6feb-4531-81f0-9ac6edd14064.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from .bookmark import Bookmark\r\nfrom .comment import Comment\r\nfrom .like import Like\r\nfrom .post import Post\r\nfrom .user import User\r\nfrom .view import View\r\n"}]}
|
134 |
{"file_name": "d874be25-1ac6-4b36-8272-cbb5428ab3e9.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from datetime import datetime\r\n\r\nfrom sqlalchemy import ForeignKey\r\nfrom sqlalchemy.orm import Mapped, mapped_column, relationship\r\n\r\nfrom ..database import Base\r\n\r\n\r\nclass View(Base):\r\n __tablename__ = \"views\"\r\n\r\n id: Mapped[str] = mapped_column(primary_key=True)\r\n author_id: Mapped[str] = mapped_column(ForeignKey(\"users.id\"))\r\n post_id: Mapped[str] = mapped_column(ForeignKey(\"posts.id\"))\r\n view_date: Mapped[datetime] = mapped_column(default_factory=datetime.utcnow)\r\n\r\n author = relationship(\"User\", back_populates=\"views\")\r\n post = relationship(\"Post\", back_populates=\"views\")\r\n"}]}
|
135 |
+
{"file_name": "4d49e77c-734c-469a-9baf-83bbb60ee623.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "def add(a, b):\r\n \"\"\"\r\n Add two numbers together.\r\n\r\n Parameters\r\n ----------\r\n a : int or float\r\n First number to be added.\r\n b : int or float\r\n Second number to be added.\r\n\r\n Returns\r\n -------\r\n int or float\r\n Sum of a and b.\r\n\r\n Raises\r\n ------\r\n TypeError\r\n If a or b is not an int or float.\r\n \"\"\"\r\n try:\r\n return operator.add(a, b)\r\n except TypeError:\r\n raise TypeError(\"a and b must be either int or float\")\r\n\r\n # Example 1: Adding two integers\r\n result = add(5, 10)\r\n print(result) # Output: 15\r\n\r\n # Example 2: Adding two floats\r\n result = add(3.5, 2.5)\r\n print(result) # Output: 6.0\r\n\r\n # Example 3: Adding an integer and a string\r\n result = add(5, \"10\")\r\n # Output: TypeError: a and b must be either int or float\r\n \r\n \r\n "}]}
|
136 |
+
{"file_name": "ccdaa8c9-81dc-498a-9046-721417fb0ed3.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import cv2\r\nfrom ultralytics import YOLO\r\n\r\n\r\n# model = YOLO(\"yolov9c.pt\")\r\n# model = YOLO(\"yolov8x.pt\")\r\nmodel = YOLO('yolov9c-seg.pt')\r\nres = model.predict(\"soccer.jpeg\", save=True)\r\nprint(res)"}]}
|
137 |
+
{"file_name": "b7cce6e2-e6d4-461f-888b-6373790d2fef.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from flask.cli import FlaskGroup\r\nfrom app import create_app\r\n\r\n\r\napp = create_app()\r\ncli = FlaskGroup(create_app=create_app)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n cli()"}]}
|
138 |
+
{"file_name": "bd946ac6-ec8c-4eb7-8a99-35efb0124030.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from dotenv import load_dotenv\r\nload_dotenv()\r\nimport os\r\n\r\nimport googlemaps\r\ngmaps = googlemaps.Client(key=os.environ['GOOGLE_MAPS_API_KEY'])\r\n\r\n# directions_result = gmaps.directions(\r\n# start,\r\n# end,\r\n# waypoints=waypoints,\r\n# mode=transit_type,\r\n# units=\"metric\",\r\n# optimize_waypoints=True,\r\n# traffic_model=\"best_guess\",\r\n# departure_time=start_time,\r\n# )\r\ndef convert_to_coords(input_address):\r\n return gmaps.geocode(input_address)\r\n\r\ngmaps = googlemaps.Client(key=os.environ[\"GOOGLE_MAPS_API_KEY\"])\r\n\r\nexample_coords = convert_to_coords(\"Rachives, Nairobi Kenya\")\r\nprint(example_coords)"}]}
|
139 |
+
{"file_name": "b8540c6d-1e87-47fc-94ee-d7a88a1357f4.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": ""}]}
|
140 |
+
{"file_name": "06f15523-2eb9-4269-b9aa-b4399fe864a0.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from setuptools import find_packages, setup\r\nfrom pip._vendor import tomli\r\n\r\n# For consistent encoding\r\nfrom codecs import open\r\nfrom os import path\r\n\r\n# The directory containing this file\r\nHERE = path.abspath(path.dirname(__file__))\r\n\r\n# Get the long description from the README file\r\nwith open(path.join(HERE, 'README.md'), encoding='utf-8') as f:\r\n LONG_DESCRIPTION = f.read()\r\n\r\nwith open('pyproject.toml', 'r') as f:\r\n VERSION = tomli.load(f)['tool']['commitizen']['version']\r\n\r\nDESCRIPTION = 'A python library for working with Google Drive.'\r\n\r\nkey_words = [\r\n 'drive', 'google-drive', 'google-drive-api', 'upload files to Google Drive',\r\n]\r\n\r\ninstall_requires = [\r\n 'oryks-google-oauth',\r\n 'pydantic',\r\n 'pydantic-settings'\r\n]\r\n\r\nsetup(\r\n name='oryks-google-drive',\r\n packages=find_packages(\r\n include=[\r\n 'google_drive',\r\n 'google_drive.exceptions',\r\n 'google_drive.models',\r\n 'google_drive.schemas',\r\n 'google_drive.resources'\r\n ]\r\n ),"}]}
|
141 |
+
{"file_name": "f2826d96-90ea-4cfc-88a4-a583d653f6e1.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from google_drive import GoogleDrive\r\n\r\n\r\nclient_secrets_file = 'drive.json'\r\ndrive = GoogleDrive(client_secret_file=client_secrets_file)\r\ndrive.authenticate()\r\n"}]}
|
142 |
+
{"file_name": "1663d19f-2b5a-4417-9ec6-0484256f288a.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from dotenv import load_dotenv\r\nload_dotenv()\r\nfrom assistant.agents import default_agent\r\nimport chainlit as cl\r\n\r\n\r\n@cl.on_chat_start\r\nasync def start():\r\n cl.user_session.set('agent', default_agent)\r\n\r\n\r\n@cl.on_message\r\nasync def main(message: cl.Message):\r\n agent = cl.user_session.get('agent')\r\n msg = cl.Message(content='')\r\n await msg.send()\r\n await cl.sleep(1)\r\n msg.content = agent.invoke({'input': message.content})['output']\r\n await msg.update()\r\n"}]}
|
143 |
+
{"file_name": "f41c87d8-b0ea-4870-bd06-9af3c653e6de.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from setuptools import find_packages, setup\r\nfrom pip._vendor import tomli\r\n\r\n# For consistent encoding\r\nfrom codecs import open\r\nfrom os import path\r\n\r\n# The directory containing this file\r\nHERE = path.abspath(path.dirname(__file__))\r\n\r\n# Get the long description from the README file\r\nwith open(path.join(HERE, 'README.md'), encoding='utf-8') as f:\r\n LONG_DESCRIPTION = f.read()\r\n\r\nwith open('pyproject.toml', 'r') as f:\r\n VERSION = tomli.load(f)['tool']['commitizen']['version']\r\n\r\nDESCRIPTION = 'A chatbot that enables the user interact with youtube over chat.'\r\n\r\nkey_words = [\r\n 'youtube', 'youtube-api', 'youtube comments', 'youtube videos', 'chat with youtube',\r\n 'youtube channels', 'youtube comment thread', 'create youtube playlist'\r\n]\r\n\r\ninstall_requires = [\r\n 'oryks-youtube',\r\n 'pydantic',\r\n 'pydantic-settings'\r\n]\r\n\r\nsetup(\r\n name='youtube-assistant',\r\n packages=find_packages(\r\n include=[\r\n 'assistant',\r\n ]\r\n ),\r\n version=VERSION,\r\n description=DESCRIPTION,\r\n long_description_content_type='text/markdown',"}]}
|
144 |
+
{"file_name": "6732d021-02cf-4351-a5c6-7e8b10869ac4.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "\r\n\r\n\r\n\r\n"}]}
|
145 |
+
{"file_name": "94a57345-7ff3-4eee-bdbe-24265d8ba41b.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from dotenv import load_dotenv\r\nload_dotenv()\r\nimport chainlit as cl\r\nfrom farm_agent.agents import agent\r\nfrom farm_agent.utils import load_model, evaluate_image\r\nfrom PIL import Image\r\nimport io\r\n\r\n\r\nuser_location: str = None\r\nuser_name: str = None\r\nwelcome_text: str = \"\"\"\r\nHello there. This is an application that helps farmers monitor the health level of their crops. \r\nStart by giving me your name and location, then upload an image of your crops. I will analyze it to \r\ndetermine the diasease or pest that affects it and then tell you how to deal with the pest or \r\ndisease and where to purchase pesticides or fungicides.\r\n\"\"\"\r\n\r\n@cl.on_chat_start\r\nasync def start():\r\n cl.user_session.set(\"agent\", agent)\r\n await cl.Message(content=welcome_text).send()\r\n user_name = await cl.AskUserMessage(content=\"What is your name?\", timeout=120).send()\r\n user_location = await cl.AskUserMessage(content=\"Where are you from?\", timeout=120).send()\r\n res = await cl.AskActionMessage(\r\n content=\"Would you like to determine if your crops are infected by a disease or by pests?\",\r\n actions=[\r\n cl.Action(name=\"Check for diseases\", value=\"diseases\", label=\"\u2705 Check for diseases\"),\r\n cl.Action(name=\"Check for Pests\", value=\"pests\", label=\"\u274c Check for Pests\")\r\n ]\r\n ).send()\r\n if res and res.get(\"value\") == \"diseases\":\r\n files = None\r\n # Wait for the user to upload a file\r\n while files == None:\r\n files = await cl.AskFileMessage(\r\n content=f\"{user_name['content']}, start by uploading an image of your crop.\", \r\n accept=[\"image/jpeg\", \"image/png\", \"image/jpg\"]\r\n ).send()\r\n # Decode the file"}]}
|
146 |
+
{"file_name": "4644dc7c-254e-454e-b80e-2c5196e29756.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from dotenv import load_dotenv\r\nload_dotenv()\r\nimport chainlit as cl\r\n\r\nfrom calendar_assistant.usecases.agent import agent_executor\r\n\r\n\r\n@cl.on_message\r\nasync def main(message: cl.Message):\r\n msg = cl.Message(content=\"\")\r\n await msg.send()\r\n await cl.sleep(1)\r\n msg.content = agent_executor.invoke({\"input\": message.content})['output']\r\n await msg.update()"}]}
|
147 |
+
{"file_name": "e90744fe-7903-4e1a-ac5a-9d20c33141ca.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from dotenv import load_dotenv\r\nload_dotenv()\r\nimport chainlit as cl\r\nfrom farm_agent.agents import agent\r\nfrom farm_agent.utils import load_model, evaluate_image\r\nfrom PIL import Image\r\nimport io\r\n\r\n\r\nuser_location: str = None\r\nuser_name: str = None\r\nwelcome_text: str = \"\"\"\r\nHello there. This is an application that helps farmers monitor the health level of their crops. \r\nStart by giving me your name and location, then upload an image of your crops. I will analyze it to \r\ndetermine the diasease or pest that affects it and then tell you how to deal with the pest or \r\ndisease and where to purchase pesticides or fungicides.\r\n\"\"\"\r\n\r\n@cl.on_chat_start\r\nasync def start():\r\n cl.user_session.set(\"agent\", agent)\r\n await cl.Message(content=welcome_text).send()\r\n user_name = await cl.AskUserMessage(content=\"What is your name?\", timeout=120).send()\r\n user_location = await cl.AskUserMessage(content=\"Where are you from?\", timeout=120).send()\r\n res = await cl.AskActionMessage(\r\n content=\"Would you like to determine if your crops are infected by a disease or by pests?\",\r\n actions=[\r\n cl.Action(name=\"Check for diseases\", value=\"diseases\", label=\"\u2705 Check for diseases\"),\r\n cl.Action(name=\"Check for Pests\", value=\"pests\", label=\"\u274c Check for Pests\")\r\n ]\r\n ).send()\r\n if res and res.get(\"value\") == \"diseases\":\r\n files = None\r\n # Wait for the user to upload a file\r\n while files == None:\r\n files = await cl.AskFileMessage(\r\n content=f\"{user_name['content']}, start by uploading an image of your crop.\", \r\n accept=[\"image/jpeg\", \"image/png\", \"image/jpg\"]\r\n ).send()\r\n # Decode the file"}]}
|
148 |
+
{"file_name": "671ef76a-7d26-431c-aa5c-cdf86a98ca3d.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import chainlit as cl\r\nfrom assistant.utils.assistant_utils import welcome_user\r\nfrom assistant.agent import get_agent_executor\r\n\r\n\r\n@cl.on_chat_start\r\nasync def start():\r\n res = await cl.AskUserMessage(content=\"What is your name?\", timeout=30).send()\r\n if res:\r\n msg = cl.Message(content=\"\")\r\n await msg.send()\r\n msg.content = welcome_user(user_name=res['content'])\r\n await msg.update()\r\n \r\n\r\n@cl.on_message\r\nasync def main(message: cl.Message):\r\n msg = cl.Message(content=\"\")\r\n await msg.send()\r\n query: str = message.content\r\n agent_executor = get_agent_executor(query)\r\n msg.content = agent_executor.invoke({\"input\": query})['output']\r\n await msg.update()"}]}
|
149 |
+
{"file_name": "f28cb5a0-9737-47f2-ba41-3e44e13e135c.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "import torch\r\nimport os\r\nfrom torch import nn\r\nfrom torchvision import transforms\r\nimport numpy as np\r\nimport os\r\nfrom PIL import Image\r\nimport torch\r\nimport os\r\nfrom torch import nn\r\nimport torch.nn.functional as F\r\nimport random\r\n\r\n\r\nclass MaizeNet(nn.Module):\r\n def __init__(self, K) -> None:\r\n super(MaizeNet, self).__init__()\r\n\r\n self.conv_layers = nn.Sequential(\r\n # convolution 1\r\n nn.Conv2d(in_channels=3, out_channels=32, kernel_size=3, padding=1),\r\n nn.ReLU(),\r\n nn.BatchNorm2d(32),\r\n nn.Conv2d(in_channels=32, out_channels=32, kernel_size=3, padding=1),\r\n nn.ReLU(),\r\n nn.BatchNorm2d(32),\r\n nn.MaxPool2d(2),\r\n # Convolution 2\r\n nn.Conv2d(in_channels=32, out_channels=64, kernel_size=3, padding=1),\r\n nn.ReLU(),\r\n nn.BatchNorm2d(64),\r\n nn.Conv2d(in_channels=64, out_channels=64, kernel_size=3, padding=1),\r\n nn.ReLU(),\r\n nn.BatchNorm2d(64),\r\n nn.MaxPool2d(2),\r\n # Convolution 3\r\n nn.Conv2d(in_channels=64, out_channels=128, kernel_size=3, padding=1),\r\n nn.ReLU(),\r\n nn.BatchNorm2d(128),\r\n nn.Conv2d(in_channels=128, out_channels=128, kernel_size=3, padding=1),"}]}
|
150 |
+
{"file_name": "651e6fca-31d2-4e7d-bd07-8930ba48fb17.png", "messages": [{"role": "SYSTEM", "content": "You are a helpful assistant that knows how to extract python code from images."}, {"role": "USER", "content": "Extract python code from the given image."}, {"role": "ASSISTANT", "content": "from flask.cli import FlaskGroup\r\nfrom app import create_app\r\n\r\n\r\napp = create_app()\r\ncli = FlaskGroup(create_app=create_app)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n cli()"}]}
|