Spaces:
Running
on
Zero
Running
on
Zero
- mynewapp/__init__.py +0 -0
- mynewapp/admin.py +3 -0
- mynewapp/apps.py +6 -0
- mynewapp/migrations/__init__.py +0 -0
- mynewapp/models.py +3 -0
- mynewapp/tests.py +3 -0
- mynewapp/views.py +3 -0
- myproject/workspace/main.py +1 -0
- mysite/interpreter_config.py +19 -29
- routers/ai/prompt +1 -1
- workspace/hello.py +1 -0
- workspace/hello.txt +0 -0
- workspace/main.py +1 -0
- workspace/wandb_sample.py +0 -0
mynewapp/__init__.py
ADDED
File without changes
|
mynewapp/admin.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.contrib import admin
|
2 |
+
|
3 |
+
# Register your models here.
|
mynewapp/apps.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from django.apps import AppConfig
|
2 |
+
|
3 |
+
|
4 |
+
class MynewappConfig(AppConfig):
|
5 |
+
default_auto_field = 'django.db.models.BigAutoField'
|
6 |
+
name = 'mynewapp'
|
mynewapp/migrations/__init__.py
ADDED
File without changes
|
mynewapp/models.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.db import models
|
2 |
+
|
3 |
+
# Create your models here.
|
mynewapp/tests.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.test import TestCase
|
2 |
+
|
3 |
+
# Create your tests here.
|
mynewapp/views.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.shortcuts import render
|
2 |
+
|
3 |
+
# Create your views here.
|
myproject/workspace/main.py
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
print('Hello, World!')
|
mysite/interpreter_config.py
CHANGED
@@ -28,35 +28,25 @@ interpreter.debug_mode = False
|
|
28 |
interpreter.temperature = 0.7
|
29 |
|
30 |
CODE_INTERPRETER_SYSTEM_PROMPT = (
|
31 |
-
"
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
"
|
50 |
-
"Write messages to the user in Markdown. Write code on multiple lines with proper indentation for readability. \n"
|
51 |
-
"In general, try to *make plans* with as few steps as possible. As for actually executing code to carry out that plan, "
|
52 |
-
"**it's critical not to try to do everything in one code block.** You should try something, print information about it, "
|
53 |
-
"then continue from there in tiny, informed steps. You will never get it on the first try, "
|
54 |
-
"and attempting it in one go will often lead to errors you cant see. \n"
|
55 |
-
"ANY FILE THAT YOU HAVE TO CREATE IT HAS TO BE CREATE IT IN './workspace' EVEN WHEN THE USER DOESN'T WANTED. \n"
|
56 |
-
"You are capable of almost *any* task, but you can't run code that show *UI* from a python file "
|
57 |
-
"so that's why you always review the code in the file, you're told to run. \n"
|
58 |
-
"# Ensure there are no backticks ` in the code before execution. \n"
|
59 |
-
"# Remove any accidental backticks to avoid syntax errors. \n"
|
60 |
)
|
61 |
PRMPT2 = """
|
62 |
You will get instructions for code to write.
|
|
|
28 |
interpreter.temperature = 0.7
|
29 |
|
30 |
CODE_INTERPRETER_SYSTEM_PROMPT = (
|
31 |
+
"""
|
32 |
+
You are Open Interpreter, a world-class programmer that can complete any goal by executing code.
|
33 |
+
First, write a plan. *Always recap the plan between each code block* (you have extreme short-term memory loss, so you need to recap the plan between each message block to retain it).
|
34 |
+
When you execute code, it will be executed *on the streamlit cloud machine.* The cloud has given you **almost full and complete permission* to execute any code necessary to complete the task.
|
35 |
+
You have full access to control their computer to help them.
|
36 |
+
If you want to send data between programming languages, save the data to a txt or json in the current directory you're in. But when you have to create a file because the user asks for it, you have to **ALWAYS* create it *WITHIN* the folder *'./workspace'** that is in the current directory even if the user asks you to write it in another part of the directory. Do not ask the user if they want to write it there.
|
37 |
+
You can access the internet. Run *any code* to achieve the goal, and if at first you don't succeed, try again and again.
|
38 |
+
You can install new packages. Try to install all necessary packages in one command at the beginning. Do not use `!pip` or `!` to install packages; instead, use `subprocess.run(["pip", "install", "package_name"])`.
|
39 |
+
When a user refers to a filename, always assume they're likely referring to an existing file in the folder *'./workspace'* that is located in the directory you're currently executing code in.
|
40 |
+
For R, the usual display is missing. You will need to *save outputs as images* then DISPLAY THEM using markdown code to display images. Do this for ALL VISUAL R OUTPUTS.
|
41 |
+
In general, choose packages that have the most universal chance to be already installed and to work across multiple applications. Packages like ffmpeg and pandoc that are well-supported and powerful.
|
42 |
+
Write messages to the user in Markdown. Write code on multiple lines with proper indentation for readability.
|
43 |
+
In general, try to *make plans* with as few steps as possible. As for actually executing code to carry out that plan, **it's critical not to try to do everything in one code block.** You should try something, print information about it, then continue from there in tiny, informed steps. You will never get it on the first try, and attempting it in one go will often lead to errors you can't see.
|
44 |
+
ANY FILE THAT YOU HAVE TO CREATE IT HAS TO BE CREATED IN './workspace' EVEN WHEN THE USER DOESN'T WANT IT.
|
45 |
+
You are capable of almost *any* task, but you can't run code that shows *UI* from a python file so that's why you always review the code in the file you're told to run.
|
46 |
+
# Ensure there are no backticks ` in the code before execution.
|
47 |
+
# Remove any accidental backticks to avoid syntax errors.
|
48 |
+
|
49 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
)
|
51 |
PRMPT2 = """
|
52 |
You will get instructions for code to write.
|
routers/ai/prompt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
|
|
1 |
+
Please generate a natural language processing model's prompt for generating a product information page that discusses the creation of a Postgres database with CRUD functionality using Python and SQLAlchemy
|
workspace/hello.py
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
print('Hello, World!')
|
workspace/hello.txt
ADDED
File without changes
|
workspace/main.py
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
print("Hello, World!")
|
workspace/wandb_sample.py
ADDED
File without changes
|