Spaces:
Sleeping
Sleeping
File size: 1,010 Bytes
3d756f4 37c1758 3d756f4 f307119 868c45e 6bfdad2 868c45e 6bfdad2 868c45e 1c1f4be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import streamlit as st
from transformers import pipeline
pipe = pipeline("text-generation", model="austenem/Llama-2-7b-arg-quality")
text = st.text_area('Enter argument and topic:')
if text:
out = pipe(text)
st.json(out)
# import streamlit as st
# from transformers import pipeline
# arg_pipeline = pipeline("text-generation", model="austenem/Llama-2-7b-arg-quality")
# st.title("Arg Quality Ranker")
# st.write("Enter an argument and topic to analyze argument quality:")
# st.write("Argument:")
# user_argument = st.text_input("", key="argument")
# st.write("Topic:")
# user_topic = st.text_input("", key="topic")
# st.write("Score:")
# if user_argument and user_topic:
# user_input = f"Below is an argument and the topic it relates to. Please rate the quality of the argument on a scale of 0 to 1, where 0 is very poor and 1 is very good. \n ### Argument: {user_argument} \n ### Topic: {user_topic} \n ### Score: "
# result = arg_pipeline(user_input)
# st.write(result[0]["text"])
|