Llama.ui / app.py
Yahir's picture
Update app.py
c6ad043
raw
history blame
472 Bytes
# -*- coding: utf-8 -*-
import streamlit as st
import subprocess
def run_llama(input):
output = subprocess.check_output(['./main', '-m', 'qunt4_0.bin', '-p', "Usuario: "+ input + ". Asistente:"])
output_str = str(output.decode('utf-8'))
response = output_str.split("Asistente:")[-1].strip()
return response
st.title("Llama Model")
input_text = st.text_input("Input Text", "")
if st.button("Run"):
output = run_llama(input_text)
st.write(output)