Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
import requests
|
2 |
import streamlit as st
|
3 |
import yfinance as yf
|
|
|
|
|
4 |
|
5 |
-
|
|
|
|
|
6 |
ch=st.sidebar.selectbox('Menu',menu)
|
7 |
|
8 |
|
@@ -81,7 +85,7 @@ if ch == 'Sales':
|
|
81 |
|
82 |
|
83 |
|
84 |
-
if ch == 'Registeration form':
|
85 |
st.title('Registration form')
|
86 |
|
87 |
|
@@ -187,13 +191,15 @@ if ch == 'Registeration form':
|
|
187 |
|
188 |
|
189 |
|
190 |
-
if ch == 'Online register':
|
191 |
st.title('Online Bestil forsikringstracker')
|
192 |
|
193 |
st.subheader('Customer information')
|
194 |
|
195 |
-
ct = ['Private','Business']
|
196 |
ctype = st.selectbox('Customer type', ct)
|
|
|
|
|
197 |
|
198 |
cemail = st.text_input('Email')
|
199 |
if not cemail:
|
@@ -310,3 +316,137 @@ if ch == 'Online register':
|
|
310 |
subm=st.button('Send')
|
311 |
if subm:
|
312 |
st.write('Check your email to continue')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import requests
|
2 |
import streamlit as st
|
3 |
import yfinance as yf
|
4 |
+
import streamlit.components.v1 as components
|
5 |
+
from requests_html import HTMLSession
|
6 |
|
7 |
+
|
8 |
+
|
9 |
+
menu=['Home','Sport news','Crypto','Sales','Registeration form by streamlit','Online register step by step','Registeration form by component,Html']
|
10 |
ch=st.sidebar.selectbox('Menu',menu)
|
11 |
|
12 |
|
|
|
85 |
|
86 |
|
87 |
|
88 |
+
if ch == 'Registeration form by streamlit':
|
89 |
st.title('Registration form')
|
90 |
|
91 |
|
|
|
191 |
|
192 |
|
193 |
|
194 |
+
if ch == 'Online register step by step':
|
195 |
st.title('Online Bestil forsikringstracker')
|
196 |
|
197 |
st.subheader('Customer information')
|
198 |
|
199 |
+
ct = ['--Select--','Private','Business']
|
200 |
ctype = st.selectbox('Customer type', ct)
|
201 |
+
if '--Select--' in ctype:
|
202 |
+
st.stop()
|
203 |
|
204 |
cemail = st.text_input('Email')
|
205 |
if not cemail:
|
|
|
316 |
subm=st.button('Send')
|
317 |
if subm:
|
318 |
st.write('Check your email to continue')
|
319 |
+
|
320 |
+
|
321 |
+
|
322 |
+
|
323 |
+
|
324 |
+
|
325 |
+
|
326 |
+
|
327 |
+
|
328 |
+
|
329 |
+
if ch == 'Registeration form by component,Html':
|
330 |
+
|
331 |
+
#define css
|
332 |
+
|
333 |
+
|
334 |
+
|
335 |
+
|
336 |
+
#define html
|
337 |
+
components.html("""
|
338 |
+
<!doctype html>
|
339 |
+
|
340 |
+
<html>
|
341 |
+
<head>
|
342 |
+
|
343 |
+
</head>
|
344 |
+
<script language="Javascript">
|
345 |
+
function hideA(x) {
|
346 |
+
if (x.checked) {
|
347 |
+
document.getElementById("A").style.display = "none";
|
348 |
+
document.getElementById("B").style.display = "initial";
|
349 |
+
document.getElementById('option1').checked = true;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
function hideB(x) {
|
354 |
+
if (x.checked) {
|
355 |
+
document.getElementById("B").style.display = "none";
|
356 |
+
document.getElementById("A").style.display = "initial";
|
357 |
+
document.getElementById('option4').checked = true;
|
358 |
+
}
|
359 |
+
}
|
360 |
+
|
361 |
+
</script>
|
362 |
+
|
363 |
+
<body>
|
364 |
+
<h1>Tilmeldingsformular</h1>
|
365 |
+
|
366 |
+
|
367 |
+
|
368 |
+
|
369 |
+
<div id="A">
|
370 |
+
|
371 |
+
<form method="post" >
|
372 |
+
Status:
|
373 |
+
<input type="radio" name="c" id='option1' onchange="hideB(this)" value="1" checked="checked" >Ny kunde
|
374 |
+
<input type="radio" name="c" id='option2' onchange="hideA(this)" value="2"> Eksisterende kunde
|
375 |
+
<br><br>
|
376 |
+
<input type="text" placeholder="Fornavn og Efternavn*" name="name" required minlength="4"/>
|
377 |
+
<br><br>
|
378 |
+
<input type="text" placeholder="Firmanavn" name="firma" />
|
379 |
+
<br><br>
|
380 |
+
<input type="email" placeholder="E-mail*" name="email" required/>
|
381 |
+
<br><br>
|
382 |
+
<input type="text" placeholder="Telefonnummer" name="tlf" />
|
383 |
+
<br><br>
|
384 |
+
<input type="text" placeholder="Post nr" name="post" />
|
385 |
+
<br><br>
|
386 |
+
<input type="text" placeholder="By" name="city" />
|
387 |
+
<br><br>
|
388 |
+
<input type="text" placeholder="Adresse" name="address" />
|
389 |
+
<br><br>
|
390 |
+
<input type="text" placeholder="Nummerplade*" name="plate" required minlength="4"/>
|
391 |
+
<br><br>
|
392 |
+
<input type="text" placeholder="Mærke" name="mark" />
|
393 |
+
<br><br>
|
394 |
+
<input type="text" placeholder="Model" name="model" />
|
395 |
+
<br><br>
|
396 |
+
<input type="text" placeholder="Årgang" name="year" />
|
397 |
+
<br><br>
|
398 |
+
|
399 |
+
Abonnement: <input type="radio" name="s" id="f" value="1" checked="checked"> ULTIMATE
|
400 |
+
<input type="radio" name="s" id="k" value="2"> PREMIUM
|
401 |
+
<input type="radio" name="s" id="p" value="3" > BASIC
|
402 |
+
<br><br>
|
403 |
+
|
404 |
+
<input type="text" placeholder="IMEI nr.*" name="imei" required/>
|
405 |
+
<br><br>
|
406 |
+
|
407 |
+
Enhed model: <input type="radio" name="m" value="1" checked="checked"> GT06E
|
408 |
+
<!-- <input type="radio" name="m" value="2"> GV20
|
409 |
+
<input type="radio" name="m" value="3" > ET25
|
410 |
+
<input type="radio" name="m" value="9" checked="checked" > Unknown-->
|
411 |
+
<br><br>
|
412 |
+
|
413 |
+
|
414 |
+
|
415 |
+
<input type=submit value=Opret>
|
416 |
+
</form>
|
417 |
+
</div>
|
418 |
+
|
419 |
+
|
420 |
+
|
421 |
+
<div id="B" style="display:none">
|
422 |
+
<form method="post">
|
423 |
+
Status:
|
424 |
+
<input type="radio" name="c" id='option3' onchange="hideB(this)" value="1" >Ny kunde
|
425 |
+
<input type="radio" name="c" id='option4' onchange="hideA(this)" value="2" checked="checked" > Eksisterende kunde
|
426 |
+
<br><br>
|
427 |
+
<input type="email" placeholder="E-mail*" name="email" required/>
|
428 |
+
<br><br>
|
429 |
+
<input type="text" placeholder="Nummerplade*" name="plate" required minlength="4"/>
|
430 |
+
<br><br>
|
431 |
+
<input type="text" placeholder="Mærke" name="mark" />
|
432 |
+
<br><br>
|
433 |
+
<input type="text" placeholder="Model" name="model" />
|
434 |
+
<br><br>
|
435 |
+
<input type="text" placeholder="Årgang" name="year" />
|
436 |
+
<br><br>
|
437 |
+
<input type="text" placeholder="IMEI nr.*" name="imei" required/>
|
438 |
+
<br><br>
|
439 |
+
|
440 |
+
Enhed model: <input type="radio" name="m" value="1" checked="checked"> GT06E
|
441 |
+
<!--<input type="radio" name="m" value="2"> GV20
|
442 |
+
<input type="radio" name="m" value="3" > ET25
|
443 |
+
<input type="radio" name="m" value="9" > Unknown-->
|
444 |
+
<br><br>
|
445 |
+
<input type=submit value=Opret>
|
446 |
+
</form>
|
447 |
+
</div>
|
448 |
+
|
449 |
+
|
450 |
+
</body>
|
451 |
+
</html>
|
452 |
+
""", height=1000)
|