Spaces:
Running
Running
Baptiste Falligan
commited on
Commit
·
37f0bc6
1
Parent(s):
8a9b52a
Add application file
Browse files- app.py +11 -0
- requirements.txt +3 -0
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
import torch
|
4 |
+
|
5 |
+
|
6 |
+
pipe = pipeline("text-generation", model="google/gemma-3-1b-pt", device="cuda", torch_dtype=torch.bfloat16)
|
7 |
+
|
8 |
+
txt = st.text_area("Test this")
|
9 |
+
|
10 |
+
if (txt):
|
11 |
+
st.write(pipe(txt, max_new_tokens=50))
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
torch
|
3 |
+
tiktoken
|