File size: 544 Bytes
c83b762
47aaf42
 
1c041ec
47aaf42
1c041ec
c83b762
1c041ec
 
 
 
d850c57
 
1c041ec
 
d850c57
 
 
dedbd51
1c041ec
 
d850c57
f72c31a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import subprocess
import torch
import streamlit as st
from streamlit import session_state as state
import streamlit_ace
import pipline

if "app" not in state:
    state.app = "model"
    state.out = ""
st.title("Streamlit using Huggingface Transformers and langchain")
in_area = st.container()
out_area = st.container()



def __run_pipline():
    out_area.markdown(":green[Running pipline]")
    out_area.text(pipline.chain_TI(state.input_text))


in_area.text_area("input_text", key="input_text")
in_area.button("run", on_click=__run_pipline)