Skip to content

TianWen580/code-oasis-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img1

⛺CODE OASIS

🛒Front-end setup

Uniapp Cloud Serve is needed

Basic requirements

Go into code-oasis.

cd code-oasis

Try this command after you are in code-oasis/.

npm install

Uni-app setup

Our project's cloud database was built with Uni-app,You are willing to register for an acount of Uniapp, and create a new Aliyun Server Space for cloud develope envoriment(free of charge). Then install plug-ins as listed if you use VS Code as your IDE(otherwise, skip this step).

  • uni-app-helper
  • uni-create-view
  • Vetur
  • Vite
  • Vue Language Features(Volar)

If you want to get your envoriment for Unicloud develope in a convinient way, try HBuilder rather than VS Code. Plus, just upload the Cloud Functions in code-oasis/uniCloud-aliyun and you will find a dumped json file lessons-dump.json in this dir which you are needed to create a database table called lessons to import this file as the basic lessons in Code Oasis. Meanwhile, create another two tables uni-id-users and userSubmitLessons for users management and lesson creating, respectively.

If you have any problem, check these references:

😉Compiles and hot-reloads for front-end

npm run dev:h5

Back-end setup

Because of network envoriment, huggingface embedding may be unable to initialize sometimes.

Premise

No GPU needed, so you are only supposed to check if you have the python libs as follows(anaconda is recommended for python management):

python>=3.8
torch>=1.13.1
torchvision>=0.14.1

Other Libs

Back to root folder, and go into server/ .

cd server

Try this command for requirements of backend server. If you encounter with problems with Import Error, you may try to reuse pip install ... to prepare them.

pip install -r requirements.txt

Launch!

If you are willing to do some developing, you can run the serve.py conviniently.

python serve.py

If you deploy it for production needs, try to prepare nginx(ref) , or you can directly run the service.py for Tornado to process concurrent.

python service.py

img2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published