pr3n3y commited on
Commit
b9e7305
1 Parent(s): b8a4e05

Add application file

Browse files
Files changed (2) hide show
  1. app.py +5 -7
  2. 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
- name = st.text_input("What is your name?")
10
-
11
- if name:
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