Yanisadel commited on
Commit
fd031f1
·
verified ·
1 Parent(s): d6d387a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -25,7 +25,7 @@ class Log:
25
  @spaces.GPU
26
  def run_chatnt(input_file, custom_question):
27
  with open(log_file, "a") as log:
28
- log.write("Request started\n")
29
 
30
  if not custom_question or custom_question.strip() == "":
31
  return None
@@ -74,8 +74,8 @@ def run_chatnt(input_file, custom_question):
74
  else:
75
  return None
76
  with open(log_file, "a") as log:
77
- log.write(f"Initial user question : {custom_question}")
78
- log.write(f"Full english prompt : {english_sequence}")
79
 
80
  # Call model
81
  with open(log_file, "a") as log:
@@ -88,7 +88,9 @@ def run_chatnt(input_file, custom_question):
88
  }
89
  )
90
 
91
- log.write(f"Output : {output}")
 
 
92
  return output
93
 
94
  # --- Gradio Interface ---
 
25
  @spaces.GPU
26
  def run_chatnt(input_file, custom_question):
27
  with open(log_file, "a") as log:
28
+ log.write("Request started\n\n")
29
 
30
  if not custom_question or custom_question.strip() == "":
31
  return None
 
74
  else:
75
  return None
76
  with open(log_file, "a") as log:
77
+ log.write(f"Initial user question : {custom_question}\n")
78
+ log.write(f"Full english prompt : {english_sequence}\n")
79
 
80
  # Call model
81
  with open(log_file, "a") as log:
 
88
  }
89
  )
90
 
91
+ with open(log_file, "a") as log:
92
+ log.write(f"Output : {output}")
93
+
94
  return output
95
 
96
  # --- Gradio Interface ---