Tonic commited on
Commit
ae48b77
1 Parent(s): 6787b43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -15,7 +15,7 @@ model.generation_config = GenerationConfig.from_pretrained(model_name, trust_rem
15
 
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  model.to(device)
18
- task_history = []
19
 
20
  BOX_TAG_PATTERN = r"<box>([\s\S]*?)</box>"
21
  PUNCTUATION = "!?。"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃》「」『』&#8203;``【oaicite:0】``&#8203;〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏."
@@ -97,6 +97,8 @@ Join us: TeamTonic is always making cool demos! Join our active builder's comm
97
  file_upload = gr.File(label="Upload Image")
98
  submit_btn = gr.Button("Submit")
99
 
 
 
100
  submit_btn.click(
101
  fn=process_input,
102
  inputs=[query, file_upload, task_history],
 
15
 
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  model.to(device)
18
+ # task_history = []
19
 
20
  BOX_TAG_PATTERN = r"<box>([\s\S]*?)</box>"
21
  PUNCTUATION = "!?。"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃》「」『』&#8203;``【oaicite:0】``&#8203;〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏."
 
97
  file_upload = gr.File(label="Upload Image")
98
  submit_btn = gr.Button("Submit")
99
 
100
+ task_history = gr.State([])
101
+
102
  submit_btn.click(
103
  fn=process_input,
104
  inputs=[query, file_upload, task_history],