tafxle commited on
Commit
25ada91
1 Parent(s): ec68453
Files changed (1) hide show
  1. app.py +1 -27
app.py CHANGED
@@ -1,31 +1,5 @@
1
  import streamlit as st
2
 
3
- def PrintContinuation(prompt, local_model, single_hook=None, batch=1, limit_tokens = 50):
4
- return ["aba"] * batch, 0
5
-
6
- import time, sys
7
-
8
- def Sureprint(text):
9
- text = f"\nDDBG {time.time()}: {text}\n"
10
- print(text, flush=True)
11
- print("E " + text, file=sys.stderr, flush=True)
12
-
13
- Sureprint("loaded")
14
  text = st.text_area("Prefix", value="DM: You enter the room.")
15
- Sureprint(f"text acquired '{text}'")
16
  batch = st.number_input("Variants", value=5)
17
-
18
- t = st.empty()
19
-
20
- Sureprint("before inference")
21
- choices, batch_time = PrintContinuation(text, None, batch=batch)
22
- Sureprint("after inference")
23
-
24
- final_page = ""
25
- for i in range(batch):
26
- final_page += f"#### choice №{i + 1} \n{choices[i]} \n______ \n"
27
- final_page += f"Seconds per batch: {batch_time}, Batch: {batch}"
28
-
29
- t.markdown(final_page)
30
-
31
- Sureprint("all done")
 
1
  import streamlit as st
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  text = st.text_area("Prefix", value="DM: You enter the room.")
 
4
  batch = st.number_input("Variants", value=5)
5
+ st.markdown(f"{text} {batch}")