skoneru commited on
Commit
9695c3a
·
2 Parent(s): 5c307a4 061e846

Merge branch 'main' of https://huggingface.co/spaces/skoneru/Ensemble_Decoding into main

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ import gradio as gr
5
 
6
  def translate(input_txt,prefix,suffix,num_beams,topk,beta):
7
  dictToSend = {'input':input_txt,'prefix':prefix,'suffix':suffix,'num_beams':num_beams,'alpha': (1-beta),'beta':beta,'topk':topk}
8
- res = requests.post('http://i13hpc68:8099/generate', json=dictToSend)
9
- return output_txt
10
 
11
  prefix= "<s>[INST] <<SYS>>\nYou are a professional translator from English to German. You translate the sentences to only Formal German even if the English sentence is Informal.\n<</SYS>>\nEnglish: "
12
  #self.prefix = "Translate from English to German:\nEnglish: "
 
5
 
6
  def translate(input_txt,prefix,suffix,num_beams,topk,beta):
7
  dictToSend = {'input':input_txt,'prefix':prefix,'suffix':suffix,'num_beams':num_beams,'alpha': (1-beta),'beta':beta,'topk':topk}
8
+ res = requests.post('https://d7bf-141-3-25-29.ngrok-free.app/generate', json=dictToSend)
9
+ return res.text
10
 
11
  prefix= "<s>[INST] <<SYS>>\nYou are a professional translator from English to German. You translate the sentences to only Formal German even if the English sentence is Informal.\n<</SYS>>\nEnglish: "
12
  #self.prefix = "Translate from English to German:\nEnglish: "