wissamantoun commited on
Commit
2de650e
1 Parent(s): f8eb1e3

fixed directory creation error

Browse files
Files changed (2) hide show
  1. backend/aragpt.py +9 -0
  2. backend/utils.py +1 -1
backend/aragpt.py CHANGED
@@ -21,6 +21,15 @@ qa_prompt_post_year = """ في سنة: """
21
 
22
 
23
  def write():
 
 
 
 
 
 
 
 
 
24
  # Sidebar
25
 
26
  # Taken from https://huggingface.co/spaces/flax-community/spanish-gpt2/blob/main/app.py
21
 
22
 
23
  def write():
24
+ st.markdown(
25
+ """
26
+ # Arabic Language Generation:
27
+
28
+ Generate Arabic text using our AraGPT2 language models. You can also try AraGPT2 Zero-Shot QA capabilities.
29
+ Please be patient with the Mega model :)
30
+
31
+ """
32
+ )
33
  # Sidebar
34
 
35
  # Taken from https://huggingface.co/spaces/flax-community/spanish-gpt2/blob/main/app.py
backend/utils.py CHANGED
@@ -18,7 +18,7 @@ def download_models(models):
18
  logger.info(f"Downloading {model}")
19
  for i in range(0, 5):
20
  curr_dir = f"{model}/train_{i}/best_model/"
21
- os.makedirs(curr_dir)
22
  os.system(
23
  f"wget -q https://huggingface.co/researchaccount/{model}/resolve/main/train_{i}/best_model/config.json -P {curr_dir}"
24
  )
18
  logger.info(f"Downloading {model}")
19
  for i in range(0, 5):
20
  curr_dir = f"{model}/train_{i}/best_model/"
21
+ os.makedirs(curr_dir, exist_ok=True)
22
  os.system(
23
  f"wget -q https://huggingface.co/researchaccount/{model}/resolve/main/train_{i}/best_model/config.json -P {curr_dir}"
24
  )