File size: 472 Bytes
5d58d95 ab9be79 5d58d95 ab9be79 c6ad043 5d58d95 c6ad043 ab9be79 5d58d95 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# -*- 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) |