freemt commited on
Commit
9396a3a
·
1 Parent(s): 0dbcf6e
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -51,6 +51,7 @@ def bloom_tr(prompt_, from_lang, to_lang, input_prompt="translate this", seed=2,
51
  # output = json.loads(response.content.decode("utf-8"))
52
  try:
53
  output = response.json()
 
54
  except Exception as exc:
55
  logger.error(exc)
56
  return str(exc)
@@ -95,8 +96,8 @@ with demo:
95
  dedent(
96
  """
97
  ## Model Details
98
- Reer to the space created by [Kishore](https://www.linkedin.com/in/kishore-kunisetty-925a3919a/) inorder to participate in [EuroPython22](https://huggingface.co/EuroPython2022)
99
- please like his project to support his contribution to EuroPython22. 😊
100
  """
101
  ).strip()
102
  )
@@ -113,12 +114,12 @@ with demo:
113
  )
114
 
115
  input_prompt = gr.Textbox(
116
- label="Enter the sentence : ",
117
  value=f'Instruction: ... \ninput: "from sentence" \n{to_lang} :',
118
- lines=6,
119
  )
120
 
121
- generated_txt = gr.Textbox(lines=7)
122
 
123
  b1 = gr.Button("translate")
124
  b1.click(
 
51
  # output = json.loads(response.content.decode("utf-8"))
52
  try:
53
  output = response.json()
54
+ return output
55
  except Exception as exc:
56
  logger.error(exc)
57
  return str(exc)
 
96
  dedent(
97
  """
98
  ## Model Details
99
+ Refer to the space created by [Kishore](https://www.linkedin.com/in/kishore-kunisetty-925a3919a/) in order to participate in [EuroPython22](https://huggingface.co/EuroPython2022)
100
+ please like his project to support his contribution to EuroPython22.
101
  """
102
  ).strip()
103
  )
 
114
  )
115
 
116
  input_prompt = gr.Textbox(
117
+ label="Enter a sentence: ",
118
  value=f'Instruction: ... \ninput: "from sentence" \n{to_lang} :',
119
+ lines=4,
120
  )
121
 
122
+ generated_txt = gr.Textbox(lines=4)
123
 
124
  b1 = gr.Button("translate")
125
  b1.click(