Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,10 @@ default_value_gen = "How can I put out grease fire?"
|
|
26 |
sent = st.text_area(label = "Input", value = default_value_gen, height = 10)
|
27 |
outputs = query(payload = sent, model_id = "mrm8488/t5-small-finetuned-quora-for-paraphrasing", api_token = api_token)
|
28 |
st.write("Paraphrased Example:")
|
|
|
29 |
st.write(outputs[0]["generated_text"])
|
30 |
-
|
|
|
31 |
st.subheader("Multilingual Models using Translation Models ππΌ")
|
32 |
st.write("Scaling your chatbot across different languages is expensive and cumbersome. There are couple of ways on how to make your chatbot speak a different language. You can either translate the intent classification data and responses and train another model and deploy it,, or you can put translation models at two ends. There are advantages and disadvantages in both approaches. For the first one, you can assess the performance of the model and hand your responses to a native speaker to have more control over what your bot says, but it requires more resources compared to second one. For the second one, assume that you're making a chatbot that is in English and want to have another language, say, German. You need two models, from German to English and from English to German.")
|
33 |
st.image("./Translation.png")
|
|
|
26 |
sent = st.text_area(label = "Input", value = default_value_gen, height = 10)
|
27 |
outputs = query(payload = sent, model_id = "mrm8488/t5-small-finetuned-quora-for-paraphrasing", api_token = api_token)
|
28 |
st.write("Paraphrased Example:")
|
29 |
+
try:
|
30 |
st.write(outputs[0]["generated_text"])
|
31 |
+
except:
|
32 |
+
st.write("Inference API loads model on demand, please wait for 10 secs and try again π€ ")
|
33 |
st.subheader("Multilingual Models using Translation Models ππΌ")
|
34 |
st.write("Scaling your chatbot across different languages is expensive and cumbersome. There are couple of ways on how to make your chatbot speak a different language. You can either translate the intent classification data and responses and train another model and deploy it,, or you can put translation models at two ends. There are advantages and disadvantages in both approaches. For the first one, you can assess the performance of the model and hand your responses to a native speaker to have more control over what your bot says, but it requires more resources compared to second one. For the second one, assume that you're making a chatbot that is in English and want to have another language, say, German. You need two models, from German to English and from English to German.")
|
35 |
st.image("./Translation.png")
|