Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ if __name__ == "__main__":
|
|
100 |
|
101 |
st.sidebar.subheader("Configurable parameters")
|
102 |
|
103 |
-
max_len = st.sidebar.slider("Max-Length", 0, 256,
|
104 |
top_k = st.sidebar.slider("Top-K", 0, 100, 0, help="The number of highest probability vocabulary tokens to keep for top-k-filtering.")
|
105 |
top_p = st.sidebar.slider("Top-P", 0.0, 1.0, 1.0, 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.")
|
106 |
|
@@ -115,7 +115,6 @@ if __name__ == "__main__":
|
|
115 |
top_k=int(top_k),
|
116 |
top_p=float(top_p))
|
117 |
|
118 |
-
print("Done length: " + str(len(result)) + " bytes")
|
119 |
#<div class="rtl" dir="rtl" style="text-align:right;">
|
120 |
st.markdown(f"<p dir=\"rtl\" style=\"text-align:right;\"> {result} </p>", unsafe_allow_html=True)
|
121 |
st.write("\n\nResult length: " + str(len(result)) + " bytes")
|
|
|
100 |
|
101 |
st.sidebar.subheader("Configurable parameters")
|
102 |
|
103 |
+
max_len = st.sidebar.slider("Max-Length", 0, 256, 70, help="The maximum length of the sequence to be generated.")
|
104 |
top_k = st.sidebar.slider("Top-K", 0, 100, 0, help="The number of highest probability vocabulary tokens to keep for top-k-filtering.")
|
105 |
top_p = st.sidebar.slider("Top-P", 0.0, 1.0, 1.0, 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.")
|
106 |
|
|
|
115 |
top_k=int(top_k),
|
116 |
top_p=float(top_p))
|
117 |
|
|
|
118 |
#<div class="rtl" dir="rtl" style="text-align:right;">
|
119 |
st.markdown(f"<p dir=\"rtl\" style=\"text-align:right;\"> {result} </p>", unsafe_allow_html=True)
|
120 |
st.write("\n\nResult length: " + str(len(result)) + " bytes")
|