willco-afk commited on
Commit
7414700
·
verified ·
1 Parent(s): 0f68fd8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ # Load the model
5
+ model = pipeline("text2text-generation", model="t5-large")
6
+
7
+ # Streamlit App Layout
8
+ st.title("Zero-Shot Reasoning with T5")
9
+ input_text = st.text_area("Enter your question:")
10
+
11
+ if input_text:
12
+ output = model(input_text, max_length=100)
13
+ st.write(f"Response: {output[0]['generated_text']}")