eljanmahammadli commited on
Commit
cfad98b
·
1 Parent(s): a62cc34

added topic name to save to GCS

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -458,6 +458,7 @@ bucket = client.bucket(bucket_name)
458
 
459
  def save_to_cloud_storage(
460
  article,
 
461
  input_role,
462
  topic_context,
463
  context,
@@ -490,6 +491,7 @@ def save_to_cloud_storage(
490
  data = {
491
  "article": article,
492
  "metadata": {
 
493
  "input_role": input_role,
494
  "topic_context": topic_context,
495
  "context": context,
@@ -604,6 +606,7 @@ def generate_and_format(
604
  if pdf_file_input is None:
605
  save_message = save_to_cloud_storage(
606
  article,
 
607
  input_role,
608
  topic_context,
609
  context,
@@ -1032,8 +1035,8 @@ def create_interface():
1032
 
1033
  if __name__ == "__main__":
1034
  demo = create_interface()
1035
- # demo.queue(
1036
- # max_size=2,
1037
- # default_concurrency_limit=2,
1038
- # ).launch(server_name="0.0.0.0", share=True, server_port=7890)
1039
- demo.launch(server_name="0.0.0.0")
 
458
 
459
  def save_to_cloud_storage(
460
  article,
461
+ topic,
462
  input_role,
463
  topic_context,
464
  context,
 
491
  data = {
492
  "article": article,
493
  "metadata": {
494
+ "topic": topic,
495
  "input_role": input_role,
496
  "topic_context": topic_context,
497
  "context": context,
 
606
  if pdf_file_input is None:
607
  save_message = save_to_cloud_storage(
608
  article,
609
+ topic,
610
  input_role,
611
  topic_context,
612
  context,
 
1035
 
1036
  if __name__ == "__main__":
1037
  demo = create_interface()
1038
+ demo.queue(
1039
+ max_size=2,
1040
+ default_concurrency_limit=2,
1041
+ ).launch(server_name="0.0.0.0", share=True, server_port=7890)
1042
+ # demo.launch(server_name="0.0.0.0")