CobaltZvc commited on
Commit
397be21
·
1 Parent(s): 209b05f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -415,7 +415,7 @@ elif Input_type == 'SPEECH':
415
  rx = 'Image returned'
416
  now = datetime.datetime.now()
417
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
418
- csv_logs(mytext, rx, date_time)
419
  except:
420
  urllib.request.urlretrieve(openai_response(prompt),"img_ret.png")
421
  img = Image.open("img_ret.png")
@@ -423,7 +423,7 @@ elif Input_type == 'SPEECH':
423
  rx = 'Image returned'
424
  now = datetime.datetime.now()
425
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
426
- csv_logs(mytext, rx, date_time)
427
  except:
428
  # Set up our initial generation parameters.
429
  answers = stability_api.generate(
@@ -455,7 +455,7 @@ elif Input_type == 'SPEECH':
455
  img.save(str(artifact.seed)+ ".png") # Save our generated images with their seed number as the filename.
456
  rx = 'Image returned'
457
  # g_sheet_log(mytext, rx)
458
- csv_logs(mytext, rx, date_time)
459
 
460
  elif ("vid_tube" in string_temp):
461
  s = Search(question)
@@ -473,7 +473,7 @@ elif Input_type == 'SPEECH':
473
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
474
  ry = 'Youtube link and video returned'
475
  # g_sheet_log(mytext, ry)
476
- csv_logs(mytext, ry, date_time)
477
 
478
 
479
  elif ("don't" in string_temp or "internet" in string_temp ):
@@ -483,7 +483,7 @@ elif Input_type == 'SPEECH':
483
  st.write(string_temp)
484
  now = datetime.datetime.now()
485
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
486
- csv_logs(mytext, string_temp, date_time)
487
 
488
 
489
  elif option_speech == 'OpenAI Whisper (Upload audio file)':
@@ -524,7 +524,7 @@ elif Input_type == 'SPEECH':
524
  rx = 'Image returned'
525
  now = datetime.datetime.now()
526
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
527
- csv_logs(mytext, rx, date_time)
528
  except:
529
  urllib.request.urlretrieve(openai_response(prompt),"img_ret.png")
530
  img = Image.open("img_ret.png")
@@ -532,7 +532,7 @@ elif Input_type == 'SPEECH':
532
  rx = 'Image returned'
533
  now = datetime.datetime.now()
534
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
535
- csv_logs(mytext, rx, date_time)
536
  except:
537
  # Set up our initial generation parameters.
538
  answers = stability_api.generate(
@@ -564,7 +564,7 @@ elif Input_type == 'SPEECH':
564
  img.save(str(artifact.seed)+ ".png") # Save our generated images with their seed number as the filename.
565
  rx = 'Image returned'
566
  # g_sheet_log(mytext, rx)
567
- csv_logs(mytext, rx, date_time)
568
 
569
 
570
  elif ("vid_tube" in string_temp):
@@ -583,7 +583,7 @@ elif Input_type == 'SPEECH':
583
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
584
  ry = 'Youtube link and video returned'
585
  # g_sheet_log(mytext, ry)
586
- csv_logs(mytext, ry, date_time)
587
 
588
  elif ("don't" in string_temp or "internet" in string_temp ):
589
  st.write('*searching internet*')
@@ -592,7 +592,7 @@ elif Input_type == 'SPEECH':
592
  st.write(string_temp)
593
  now = datetime.datetime.now()
594
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
595
- csv_logs(mytext, string_temp, date_time)
596
 
597
  else:
598
  pass
 
415
  rx = 'Image returned'
416
  now = datetime.datetime.now()
417
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
418
+ csv_logs(question, rx, date_time)
419
  except:
420
  urllib.request.urlretrieve(openai_response(prompt),"img_ret.png")
421
  img = Image.open("img_ret.png")
 
423
  rx = 'Image returned'
424
  now = datetime.datetime.now()
425
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
426
+ csv_logs(question, rx, date_time)
427
  except:
428
  # Set up our initial generation parameters.
429
  answers = stability_api.generate(
 
455
  img.save(str(artifact.seed)+ ".png") # Save our generated images with their seed number as the filename.
456
  rx = 'Image returned'
457
  # g_sheet_log(mytext, rx)
458
+ csv_logs(question, rx, date_time)
459
 
460
  elif ("vid_tube" in string_temp):
461
  s = Search(question)
 
473
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
474
  ry = 'Youtube link and video returned'
475
  # g_sheet_log(mytext, ry)
476
+ csv_logs(question, ry, date_time)
477
 
478
 
479
  elif ("don't" in string_temp or "internet" in string_temp ):
 
483
  st.write(string_temp)
484
  now = datetime.datetime.now()
485
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
486
+ csv_logs(question, string_temp, date_time)
487
 
488
 
489
  elif option_speech == 'OpenAI Whisper (Upload audio file)':
 
524
  rx = 'Image returned'
525
  now = datetime.datetime.now()
526
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
527
+ csv_logs(question, rx, date_time)
528
  except:
529
  urllib.request.urlretrieve(openai_response(prompt),"img_ret.png")
530
  img = Image.open("img_ret.png")
 
532
  rx = 'Image returned'
533
  now = datetime.datetime.now()
534
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
535
+ csv_logs(question, rx, date_time)
536
  except:
537
  # Set up our initial generation parameters.
538
  answers = stability_api.generate(
 
564
  img.save(str(artifact.seed)+ ".png") # Save our generated images with their seed number as the filename.
565
  rx = 'Image returned'
566
  # g_sheet_log(mytext, rx)
567
+ csv_logs(question, rx, date_time)
568
 
569
 
570
  elif ("vid_tube" in string_temp):
 
583
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
584
  ry = 'Youtube link and video returned'
585
  # g_sheet_log(mytext, ry)
586
+ csv_logs(question, ry, date_time)
587
 
588
  elif ("don't" in string_temp or "internet" in string_temp ):
589
  st.write('*searching internet*')
 
592
  st.write(string_temp)
593
  now = datetime.datetime.now()
594
  date_time = now.strftime("%Y-%m-%d %H:%M:%S")
595
+ csv_logs(question, string_temp, date_time)
596
 
597
  else:
598
  pass