Spaces:
Sleeping
Sleeping
Merge pull request #1 from cdb24/milestone2
Browse files- README.md +9 -0
- app.py +13 -0
- requirements.txt +9 -0
README.md
CHANGED
@@ -5,3 +5,12 @@ Tutorials Used:
|
|
5 |
https://learn.microsoft.com/en-us/visualstudio/mac/docker-quickstart?view=vsmac-2022
|
6 |
https://code.visualstudio.com/docs/containers/quickstart-python
|
7 |
https://docs.docker.com/desktop/install/mac-install/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
https://learn.microsoft.com/en-us/visualstudio/mac/docker-quickstart?view=vsmac-2022
|
6 |
https://code.visualstudio.com/docs/containers/quickstart-python
|
7 |
https://docs.docker.com/desktop/install/mac-install/
|
8 |
+
|
9 |
+
title: Milestone 2
|
10 |
+
emoji: 🐢
|
11 |
+
colorFrom: green
|
12 |
+
colorTo: purple
|
13 |
+
sdk: streamlit
|
14 |
+
sdk_version: 1.17.0
|
15 |
+
app_file: app.py
|
16 |
+
pinned: false
|
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
2 |
+
|
3 |
+
tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
4 |
+
|
5 |
+
model = AutoModelForCausalLM.from_pretrained("gpt2")
|
6 |
+
|
7 |
+
from transformers import pipeline, set_seed
|
8 |
+
|
9 |
+
generator = pipeline('text-generation', model='gpt2')
|
10 |
+
|
11 |
+
set_seed(42)
|
12 |
+
|
13 |
+
generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5)
|
requirements.txt
CHANGED
@@ -1 +1,10 @@
|
|
1 |
# To ensure app dependencies are ported from your virtual environment/host machine into your container, run 'pip freeze > requirements.txt' in the terminal to overwrite this file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# To ensure app dependencies are ported from your virtual environment/host machine into your container, run 'pip freeze > requirements.txt' in the terminal to overwrite this file
|
2 |
+
|
3 |
+
streamlit==0.84.1
|
4 |
+
Pillow
|
5 |
+
jax[cpu]
|
6 |
+
flax
|
7 |
+
transformers
|
8 |
+
huggingface_hub
|
9 |
+
googletrans==4.0.0-rc1
|
10 |
+
protobuf==3.20
|