Add application file
Browse files- app.py +5 -7
- requirements.txt +1 -0
app.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
-
def greeting(name):
|
4 |
-
st.write(f"Hello, {name}!")
|
5 |
|
6 |
st.title("My first Streamlit app")
|
7 |
st.text("This is a simple app that greets the user.")
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
greeting(name)
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
3 |
|
|
|
|
|
4 |
|
5 |
st.title("My first Streamlit app")
|
6 |
st.text("This is a simple app that greets the user.")
|
7 |
+
pipe = pipeline("text-generation", model="TurkuNLP/gpt3-finnish-3B")
|
8 |
+
result = pipe("Calculate 28% of 33", max_new_tokens=50)
|
9 |
+
if result:
|
10 |
+
st.text(result)
|
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
transformers-4.32.0
|