|
import streamlit as st |
|
|
|
st.header('Args') |
|
st.text('(Llama-7b sft)') |
|
col1, col2 = st.columns([3,1]) |
|
with col1: |
|
text = st.text_area('Enter text', "", height=180) |
|
|
|
with col2: |
|
weight = st.slider('weight', 0.0, 1.5, 0.01) |
|
k = st.slider("k", 2, 10, 1) |
|
|
|
trigger = st.button("Generate") |
|
st.subheader("Result") |
|
|
|
import requests |
|
GROK_URL = "https://f1dc-128-105-19-70.ngrok-free.app" |
|
ENDPOINT = f"{GROK_URL}/model" |
|
|
|
if trigger: |
|
result = requests.get(ENDPOINT, params={"weight": weight, "k": k, "text": text, "ngrok-skip-browser-warning": "1"}).text |
|
st.write(result) |
|
|