Spaces:
Running
Running
File size: 2,641 Bytes
b9e6a5f 5037bb5 b9e6a5f 204110c e603b9c 204110c 059efa5 9f34a2a 204110c e603b9c 9f34a2a 059efa5 9f34a2a 059efa5 204110c 7a163bb b78be06 7a163bb b78be06 7a163bb b78be06 7a163bb b78be06 7a163bb b78be06 7a163bb b78be06 7a163bb b78be06 7a163bb b78be06 7a163bb 9fa6ffd b78be06 7a163bb b78be06 7a163bb b78be06 |
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
import json
import math
import random
import os
import streamlit as st
st.set_page_config(page_title="HuggingArtists")
st.title("HuggingArtists")
st.sidebar.markdown(
"""
<style>
.aligncenter {
text-align: center;
}
</style>
<p class="aligncenter">
<img src="https://raw.githubusercontent.com/AlekseyKorshuk/huggingartists/master/img/logo.jpg" width="420" />
</p>
""",
unsafe_allow_html=True,
)
st.sidebar.markdown(
"""
<style>
.aligncenter {
text-align: center;
}
</style>
<p style='text-align: center'>
<a href="https://github.com/AlekseyKorshuk/huggingartists" target="_blank">GitHub</a> | <a href="https://wandb.ai/huggingartists/huggingartists/reportlist" target="_blank">Project Report</a>
</p>
<p class="aligncenter">
<a href="https://github.com/AlekseyKorshuk/huggingartists" target="_blank">
<img src="https://img.shields.io/github/stars/AlekseyKorshuk/huggingartists?style=social"/>
</a> |
<a href="https://colab.research.google.com/github/AlekseyKorshuk/huggingartists/blob/master/huggingartists-demo.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg"/>
</a>
</p>
""",
unsafe_allow_html=True,
)
st.sidebar.header("SETTINGS")
num_sequences = st.sidebar.number_input(
"Number of sequences to generate",
min_value=1,
value=5,
help="The amount of generated texts",
)
min_length = st.sidebar.number_input(
"Minimum length of the sequence",
min_value=1,
value=100,
help="The minimum length of the sequence to be generated",
)
max_length= st.sidebar.number_input(
"Maximum length of the sequence",
min_value=1,
value=160,
help="The maximum length of the sequence to be generated",
)
temperature = st.sidebar.slider(
"Temperature",
min_value=0.0,
max_value=3.0,
step=0.01,
value=1.0,
help="The value used to module the next token probabilities",
)
top_p = st.sidebar.slider(
"Top-P",
min_value=0.0,
max_value=1.0,
step=0.01,
value=0.95,
help="If set to float < 1, only the most probable tokens with probabilities that add up to top_p or higher are kept for generation.",
)
top_k= st.sidebar.number_input(
"Top-K",
min_value=0,
value=50,
step=1,
help="The number of highest probability vocabulary tokens to keep for top-k-filtering.",
)
caption = (
"`HuggingArtists` - Train a model to generate lyrics"
""
"In HuggingArtists, we can generate lyrics by a specific artist. This was made by fine-tuning a pre-trained HuggingFace Transformer on parsed datasets from Genius."
)
st.markdown(caption)
|