More Llamaserver.py indent fixes
This commit is contained in:
parent
c31e3b89c7
commit
e06a3d5e1b
1 changed files with 15 additions and 9 deletions
|
@ -3,6 +3,7 @@ import threading
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
def print_dict(data):
|
def print_dict(data):
|
||||||
if isinstance(data, dict):
|
if isinstance(data, dict):
|
||||||
# for k, v in data.items():
|
# for k, v in data.items():
|
||||||
|
@ -30,6 +31,7 @@ def print_dict(data):
|
||||||
print("No intelligible data received.\n")
|
print("No intelligible data received.\n")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def title_print(text):
|
def title_print(text):
|
||||||
|
|
||||||
length = len(text)
|
length = len(text)
|
||||||
|
@ -37,6 +39,7 @@ def title_print(text):
|
||||||
print(text)
|
print(text)
|
||||||
print("*" * length + "\n")
|
print("*" * length + "\n")
|
||||||
|
|
||||||
|
|
||||||
def make_empty_bar(num_requests):
|
def make_empty_bar(num_requests):
|
||||||
bar = []
|
bar = []
|
||||||
for i in range(num_requests):
|
for i in range(num_requests):
|
||||||
|
@ -46,6 +49,7 @@ def make_empty_bar(num_requests):
|
||||||
# print(f"Bar is now {bar}.\n")
|
# print(f"Bar is now {bar}.\n")
|
||||||
return bar
|
return bar
|
||||||
|
|
||||||
|
|
||||||
def make_progress_bar(bar, count, num_requests):
|
def make_progress_bar(bar, count, num_requests):
|
||||||
stride1 = len("\u2589")
|
stride1 = len("\u2589")
|
||||||
stride2 = len("\u23F1")
|
stride2 = len("\u23F1")
|
||||||
|
@ -56,6 +60,7 @@ def make_progress_bar(bar, count, num_requests):
|
||||||
print(f"Bar is now {bar}\n")
|
print(f"Bar is now {bar}\n")
|
||||||
return bar
|
return bar
|
||||||
|
|
||||||
|
|
||||||
def send_request(q, question, event, count, num_requests):
|
def send_request(q, question, event, count, num_requests):
|
||||||
|
|
||||||
delay = 0.1
|
delay = 0.1
|
||||||
|
@ -102,6 +107,7 @@ You pay close attention to the nuance of a question and respond accordingly."
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Server returned exception error {e}")
|
print(f"Server returned exception error {e}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
global bar
|
global bar
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue