Update pages/2_Qwen_Turkish_Summarization.py
Browse files
pages/2_Qwen_Turkish_Summarization.py
CHANGED
@@ -39,14 +39,6 @@ with st.expander("About this app"):
|
|
39 |
model_name: str = st.selectbox("Model", options=MODEL_QAS)
|
40 |
selected_model = MODEL_QA[model_name]
|
41 |
|
42 |
-
if not hf_key:
|
43 |
-
st.info("Please add your HuggingFace Access Key to continue.")
|
44 |
-
st.stop()
|
45 |
-
|
46 |
-
access_token = hf_key
|
47 |
-
model_name: str = st.selectbox("Model", options=MODEL_QAS)
|
48 |
-
selected_model = MODEL_QA[model_name]
|
49 |
-
|
50 |
if not hf_key:
|
51 |
st.info("Please add your HuggingFace Access Key to continue.")
|
52 |
st.stop()
|
@@ -99,7 +91,7 @@ with st.form('my_form'):
|
|
99 |
context,
|
100 |
"", # output - leave this blank for generation!
|
101 |
)
|
102 |
-
], return_tensors = "pt")
|
103 |
outputs = model.generate(input_ids = inputs.input_ids, attention_mask = inputs.attention_mask, max_new_tokens = 256, use_cache = True)
|
104 |
output = tokenizer.batch_decode(outputs)
|
105 |
o = output[0].split("### Response (Yanıt):")[1]
|
|
|
39 |
model_name: str = st.selectbox("Model", options=MODEL_QAS)
|
40 |
selected_model = MODEL_QA[model_name]
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
if not hf_key:
|
43 |
st.info("Please add your HuggingFace Access Key to continue.")
|
44 |
st.stop()
|
|
|
91 |
context,
|
92 |
"", # output - leave this blank for generation!
|
93 |
)
|
94 |
+
], return_tensors = "pt")
|
95 |
outputs = model.generate(input_ids = inputs.input_ids, attention_mask = inputs.attention_mask, max_new_tokens = 256, use_cache = True)
|
96 |
output = tokenizer.batch_decode(outputs)
|
97 |
o = output[0].split("### Response (Yanıt):")[1]
|