import requests import streamlit as st import time from transformers import pipeline import os from utils import query API_URL = "https://api-inference.huggingface.co/models/boun-tabi-LMG/TURNA" def write(): st.markdown( """

TURNA

""", unsafe_allow_html=True, ) st.write("#") col = st.columns(2) col[0].image("images/turna-logo.png", width=100) st.markdown( """

TURNA is a Turkish encoder-decoder language model.

Use the generation paramters on the sidebar to adjust generation quality.

""", unsafe_allow_html=True, ) #st.title('Turkish Language Generation') #st.write('...with Turna') input_text = st.text_area(label='Enter a text: ', height=100, value="Türkiye'nin başkenti neresidir?") if st.button("Generate"): with st.spinner('Generating...'): output = query(input_text, API_URL) st.success(output)