Zeel commited on
Commit
f429493
·
1 Parent(s): 6ac728f

encode the URL correctly.

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -127,5 +127,15 @@ trainer = train_on_responses_only(
127
  st.code(code, language="python")
128
 
129
  st.markdown("#### You may share the following URL with others to show them the results")
130
- url = f"https://zeel-twro.hf.space?model={model}&message={message}&instruction_part={instruction_part}&response_part={response_part}&chat_template_idx={chat_template_key}"
 
 
 
 
 
 
 
 
 
 
131
  st.markdown(f"`{url}`")
 
127
  st.code(code, language="python")
128
 
129
  st.markdown("#### You may share the following URL with others to show them the results")
130
+ # url = f"https://zeel-twro.hf.space?model={model}&message={message}&instruction_part={instruction_part}&response_part={response_part}&chat_template_idx={chat_template_key}"
131
+ url = "https://zeel-twro.hf.space"
132
+ params = {
133
+ "model": model,
134
+ "message": message,
135
+ "instruction_part": instruction_part,
136
+ "response_part": response_part,
137
+ "chat_template_idx": chat_template_key,
138
+ }
139
+ import urllib.parse
140
+ url = url + "?" + urllib.parse.urlencode(params)
141
  st.markdown(f"`{url}`")