miwojc commited on
Commit
3cf2155
1 Parent(s): 8c92ae6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -73,7 +73,7 @@ st.markdown(
73
  The models were trained with Jax and Flax using TPUs as part of the [Flax/Jax Community Week](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104) organised by HuggingFace.
74
  """
75
  )
76
- model_name = MODEL_name
77
  ALL_PROMPTS = list(PROMPT_LIST.keys()) + ["Custom"]
78
  prompt = st.selectbox("Prompt", ALL_PROMPTS, index=len(ALL_PROMPTS) - 1)
79
  if prompt == "Custom":
@@ -107,6 +107,10 @@ if st.button("Run"):
107
  st.write(f"{error}")
108
  else:
109
  result = result[0]["generated_text"]
110
- st.write(result.replace("\n", " \n"))
 
 
111
  st.text("English translation")
112
- st.write(translate(result, "en", "es").replace("\n", " \n"))
 
 
 
73
  The models were trained with Jax and Flax using TPUs as part of the [Flax/Jax Community Week](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104) organised by HuggingFace.
74
  """
75
  )
76
+ model_name = MODEL_NAME
77
  ALL_PROMPTS = list(PROMPT_LIST.keys()) + ["Custom"]
78
  prompt = st.selectbox("Prompt", ALL_PROMPTS, index=len(ALL_PROMPTS) - 1)
79
  if prompt == "Custom":
 
107
  st.write(f"{error}")
108
  else:
109
  result = result[0]["generated_text"]
110
+ st.write(result.replace("\
111
+ ", " \
112
+ "))
113
  st.text("English translation")
114
+ st.write(translate(result, "en", "es").replace("\
115
+ ", " \
116
+ "))