echons commited on
Commit
4c49fde
1 Parent(s): a9e98de

Update code

Browse files
Files changed (1) hide show
  1. app.py +2 -24
app.py CHANGED
@@ -7,32 +7,10 @@ from yaml.loader import SafeLoader
7
  import plotly.graph_objects as go
8
 
9
  from transformers import pipeline
10
- from PIL import Image, ImageDraw, ImageFont
11
-
12
 
13
  from backend import *
14
 
15
- # from langchain.chat_models import ChatAnthropic
16
- # from langchain.callbacks.base import BaseCallbackHandler
17
- # from langchain.prompts import PromptTemplate
18
- # from langchain.chains import LLMChain
19
-
20
-
21
- # # Streaming LLM output class
22
- # class StreamHandler(BaseCallbackHandler):
23
- # # Referenced from: https://discuss.streamlit.io/t/langchain-stream/43782
24
- # def __init__(self, container, initial_text='', display_method='markdown'):
25
- # self.container = container
26
- # self.text = initial_text
27
- # self.display_method = display_method
28
-
29
- # def on_llm_new_token(self, token: str, **kwargs) -> None:
30
- # self.text += token
31
- # display_function = getattr(self.container, self.display_method, None)
32
- # if display_function is not None:
33
- # display_function(self.text)
34
- # else:
35
- # raise ValueError(f'Invalid display_method: {self.display_method}')
36
 
37
  # Start of Streamlit App
38
  st.set_page_config(layout="centered")
@@ -194,7 +172,7 @@ if st.session_state['authentication_status']:
194
  if prompt:
195
  pass
196
  #with st.spinner("Generating..."):
197
- #st.write(get_table_qa_results(table_model, table_tokenizer, df=df, question=prompt))
198
 
199
  # Tab 3: FAQ
200
  with tab3:
 
7
  import plotly.graph_objects as go
8
 
9
  from transformers import pipeline
10
+ from PIL import Image, ImageDraw
 
11
 
12
  from backend import *
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  # Start of Streamlit App
16
  st.set_page_config(layout="centered")
 
172
  if prompt:
173
  pass
174
  #with st.spinner("Generating..."):
175
+
176
 
177
  # Tab 3: FAQ
178
  with tab3: