Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import subprocess
|
3 |
+
def run_llama(input):
|
4 |
+
output = subprocess.check_output(['./main', '-m', 'ggml-vicuna-13b-4bit.bin', '-p', input, '-n', '-1'])
|
5 |
+
return str(output.decode('utf-8'))
|
6 |
+
st.title("Llama Model")
|
7 |
+
|
8 |
+
input_text = st.text_input("Input Text", "")
|
9 |
+
if st.button("Run"):
|
10 |
+
output = run_llama(input_text)
|
11 |
+
st.write(output)
|