Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LearnJoy-ML
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chameera
LearnJoy-ML
Commits
f336deac
Commit
f336deac
authored
Jan 27, 2024
by
Prabuddha Gimhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
learnjoy colab compile
parent
8965177e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
API/Learn_joy__compile_in_colab.ipynb
API/Learn_joy__compile_in_colab.ipynb
+1
-0
No files found.
API/Learn_joy__compile_in_colab.ipynb
0 → 100644
View file @
f336deac
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"mount_file_id":"1FSu_DqUS2ttLaFM1iM8QaJziRJSnR3Cl","authorship_tag":"ABX9TyPiIQ5ZMtK7bm/628m4tY+q"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["Install needed library\n"],"metadata":{"id":"mwbmiUYBmgKm"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"7RvgD1mXl56G"},"outputs":[],"source":["!pip install -r /content/drive/MyDrive/Work_space/Silverline_IT/Project/Learn_Joy/API/app/requirements.txt"]},{"cell_type":"code","source":["!pip install --upgrade transformers -q\n","!pip install git+https://github.com/huggingface/transformers.git -q"],"metadata":{"id":"b8IOSehPuu8x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["!pip freeze"],"metadata":{"id":"tz8e0SHupyjG"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from fastapi import FastAPI\n","import uvicorn\n","from pyngrok import ngrok\n","import nest_asyncio\n","from colabcode import ColabCode\n","from pydantic import BaseModel"],"metadata":{"id":"MtgKqWRemtNO"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["Auth token"],"metadata":{"id":"tjwFR3ilmyRW"}},{"cell_type":"code","source":["ngrok.set_auth_token(\"XXXXXXXXXXXXXXXXXXXXXXXXXX\")"],"metadata":{"id":"VeJuUarMmvzh","executionInfo":{"status":"ok","timestamp":1706007838021,"user_tz":-330,"elapsed":852,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"}},"colab":{"base_uri":"https://localhost:8080/"},"outputId":"938a3eb5-2314-4b9c-ecba-6561e70cfab0"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":[]}]},{"cell_type":"code","source":["import sys\n","sys.path.append('/content/drive/MyDrive/Work_space/Silverline_IT/Project/Learn_Joy/API/app')\n","import main"],"metadata":{"id":"shISBWBsJYif"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["FastAPI run public server\n","\n","\n"],"metadata":{"id":"FjkQBKzsm5Q9"}},{"cell_type":"code","source":["ngrok_tunnel = ngrok.connect(8000)\n","print('Public URL:', ngrok_tunnel.public_url)\n","nest_asyncio.apply()\n","uvicorn.run(\"main:app\", port=8000)"],"metadata":{"id":"2lZn-LJum25D"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["ngrok.disconnect(\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\")"],"metadata":{"id":"ZQVM4uVfnGMy"},"execution_count":null,"outputs":[]}]}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment