steve7909 commited on
Commit
58ee241
·
1 Parent(s): 8ba168f
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -5,6 +5,11 @@ import pandas as pd
5
  import uuid
6
  from datetime import datetime
7
 
 
 
 
 
 
8
 
9
 
10
  use_local_llm = False
@@ -45,10 +50,7 @@ def set_client(selection):
45
  ))
46
  print("### Llama3 model loaded")
47
  else:
48
- from openai import OpenAI
49
 
50
- # Load environment variables from .env file
51
- load_dotenv()
52
  client = OpenAI(
53
  api_key=os.getenv('OPENAI_API_KEY')
54
  )
@@ -63,11 +65,12 @@ def set_client(selection):
63
  client = set_client("OpenAI")
64
 
65
  #file_path = 'anki_japanese_english_pairs.csv'
66
- file_path = 'GPT generated Japanese English sentence pairs - Sheet2.csv'
67
 
68
  def get_sentence_pair(level):
69
 
70
  # Load the CSV file
 
71
  #df = pd.read_csv(file_path)
72
 
73
  df = get_sheets_sentences()
@@ -254,7 +257,7 @@ def reset(input):
254
  return [], []
255
 
256
  with gr.Blocks(css=css) as app:
257
- gr.Markdown("""# <center><font size=8>{}</center>""".format("Hi, it's Tammy!"))
258
 
259
  with gr.Row():
260
 
 
5
  import uuid
6
  from datetime import datetime
7
 
8
+ from openai import OpenAI
9
+
10
+ # Load environment variables from .env file
11
+ load_dotenv()
12
+
13
 
14
 
15
  use_local_llm = False
 
50
  ))
51
  print("### Llama3 model loaded")
52
  else:
 
53
 
 
 
54
  client = OpenAI(
55
  api_key=os.getenv('OPENAI_API_KEY')
56
  )
 
65
  client = set_client("OpenAI")
66
 
67
  #file_path = 'anki_japanese_english_pairs.csv'
68
+
69
 
70
  def get_sentence_pair(level):
71
 
72
  # Load the CSV file
73
+ #file_path = 'GPT generated Japanese English sentence pairs - Sheet2.csv'
74
  #df = pd.read_csv(file_path)
75
 
76
  df = get_sheets_sentences()
 
257
  return [], []
258
 
259
  with gr.Blocks(css=css) as app:
260
+ gr.Markdown("""# <center><font size=8>{}</center>""".format("Hi, it's Tammy! Say hi to start."))
261
 
262
  with gr.Row():
263