jayebaku commited on
Commit
c31f305
·
verified ·
1 Parent(s): 5eb8a9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -32,12 +32,12 @@ js = """
32
  """
33
 
34
  def T_on_select(x, evt: gr.SelectData):
35
- if evt.index[1] == 3:
36
- html = """<blockquote id="tweet-container" class="twitter-tweet" data-dnt="true" data-theme="dark">""" + \
37
- f"""\n<a href="https://twitter.com/anyuser/status/{evt.value}"></a></blockquote>"""
38
- else:
39
- html = f"""<h2>{evt.value}</h2>"""
40
- return html #evt.value
41
 
42
  def single_classification(text, event_model, threshold):
43
  res = classify(text, event_model, HFTOKEN, threshold)
@@ -224,7 +224,7 @@ with gr.Blocks(fill_width=True) as demo:
224
  T_predict_button = gr.Button("Start Prediction")
225
 
226
  gr.Markdown("""Select an ID cell in dataframe to view Embedded tweet""")
227
- T_tweetID = gr.Textbox(visible=False)
228
  with gr.Group():
229
  with gr.Row():
230
  with gr.Column(scale=4):
 
32
  """
33
 
34
  def T_on_select(x, evt: gr.SelectData):
35
+ # if evt.index[1] == 3:
36
+ # html = """<blockquote id="tweet-container" class="twitter-tweet" data-dnt="true" data-theme="dark">""" + \
37
+ # f"""\n<a href="https://twitter.com/anyuser/status/{evt.value}"></a></blockquote>"""
38
+ # else:
39
+ # html = f"""<h2>{evt.value}</h2>"""
40
+ return evt.value #html
41
 
42
  def single_classification(text, event_model, threshold):
43
  res = classify(text, event_model, HFTOKEN, threshold)
 
224
  T_predict_button = gr.Button("Start Prediction")
225
 
226
  gr.Markdown("""Select an ID cell in dataframe to view Embedded tweet""")
227
+ T_tweetID = gr.Textbox()
228
  with gr.Group():
229
  with gr.Row():
230
  with gr.Column(scale=4):