Skip to content

Commit

Permalink
double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmusser01 committed May 10, 2024
1 parent 747cefc commit 03106dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ groq_api_key = <your_groq_api_key>
groq_model = llama3-70b-8192
openai_api_key = <openai_api_key>
openai_model = gpt-4-turbo
huggingface_api_key = <huggingface_api_key>
huggingface_api_token = <huggingface_api_token>
huggingface_model = CohereForAI/c4ai-command-r-plus


Expand Down
14 changes: 7 additions & 7 deletions summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,52 +1324,52 @@ def main(input_path, api_name=None, api_key=None, num_speakers=2, whisper_model=
summary = summarize_with_openai(api_key, json_file_path, openai_model)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
elif api_name.lower() == 'anthropic':
elif api_name.lower() == "anthropic":
api_key = anthropic_api_key
try:
logging.debug(f"MAIN: Trying to summarize with anthropic")
summary = summarize_with_claude(api_key, json_file_path, anthropic_model)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
elif api_name.lower() == 'cohere':
elif api_name.lower() == "cohere":
api_key = cohere_api_key
try:
logging.debug(f"MAIN: Trying to summarize with cohere")
summary = summarize_with_cohere(api_key, json_file_path, cohere_model)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
elif api_name.lower() == 'groq':
elif api_name.lower() == "groq":
api_key = groq_api_key
try:
logging.debug(f"MAIN: Trying to summarize with Groq")
summary = summarize_with_groq(api_key, json_file_path, groq_model)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
elif api_name.lower() == 'llama':
elif api_name.lower() == "llama":
token = llama_api_key
llama_ip = llama_api_IP
try:
logging.debug(f"MAIN: Trying to summarize with Llama.cpp")
summary = summarize_with_llama(llama_ip, json_file_path, token)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
elif api_name.lower() == 'kobold':
elif api_name.lower() == "kobold":
token = kobold_api_key
kobold_ip = kobold_api_IP
try:
logging.debug(f"MAIN: Trying to summarize with kobold.cpp")
summary = summarize_with_kobold(kobold_ip, json_file_path)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
elif api_name.lower() == 'ooba':
elif api_name.lower() == "ooba":
token = ooba_api_key
ooba_ip = ooba_api_IP
try:
logging.debug(f"MAIN: Trying to summarize with oobabooga")
summary = summarize_with_oobabooga(ooba_ip, json_file_path)
except requests.exceptions.ConnectionError:
r.status_code = "Connection: "
if api_name.lower() == 'huggingface':
if api_name.lower() == "huggingface":
api_key = huggingface_api_key
try:
logging.debug(f"MAIN: Trying to summarize with huggingface")
Expand Down

0 comments on commit 03106dd

Please sign in to comment.