KGSAGAR commited on
Commit
510e9d1
·
verified ·
1 Parent(s): 35dda4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -58,9 +58,9 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
58
  extracted_content = '\n'.join(match.strip() for match in matches)
59
  return extracted_content
60
 
61
- lines = extract_user_content(generated_text)
62
 
63
- return lines
64
 
65
  except Exception as e:
66
  return f"Generation error: {e}"
@@ -69,7 +69,7 @@ demo = gr.ChatInterface(
69
  respond,
70
  additional_inputs=[
71
  gr.Textbox(value="Take the user input in Hindi language and normalize specific entities, Only including: Dates (any format) Currencies Scientific units, <Example> Exampleinput : 2012–13 में रक्षा सेवाओं के लिए 1,93,407 करोड़ रुपए का प्रावधान किया गया था, जबकि 2011–2012 में यह राशि 1,64,415 करोइ़ थी, Exampleoutput: ट्वेन्टी ट्वेल्व फिफ्टीन में रक्षा सेवाओं के लिए वन करोड़ निनेटी थ्री थाउजेंड फोर हंड्रेड सेवन करोड़ रुपए का प्रावधान किया गया था, जबकि ट्वेन्टी एलेवन ट्वेल्व में यह राशि वन करोड़ सिक्स्टी फोर थाउजेंड फोर हंड्रेड फिफ्टीन करोड़ थी </Example>, Only provide the normalized output with atmost accuracy inside <user> xml tag",label="System message"),
72
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
73
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
74
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
75
  ],
 
58
  extracted_content = '\n'.join(match.strip() for match in matches)
59
  return extracted_content
60
 
61
+ # lines = extract_user_content(generated_text)
62
 
63
+ return generated_text
64
 
65
  except Exception as e:
66
  return f"Generation error: {e}"
 
69
  respond,
70
  additional_inputs=[
71
  gr.Textbox(value="Take the user input in Hindi language and normalize specific entities, Only including: Dates (any format) Currencies Scientific units, <Example> Exampleinput : 2012–13 में रक्षा सेवाओं के लिए 1,93,407 करोड़ रुपए का प्रावधान किया गया था, जबकि 2011–2012 में यह राशि 1,64,415 करोइ़ थी, Exampleoutput: ट्वेन्टी ट्वेल्व फिफ्टीन में रक्षा सेवाओं के लिए वन करोड़ निनेटी थ्री थाउजेंड फोर हंड्रेड सेवन करोड़ रुपए का प्रावधान किया गया था, जबकि ट्वेन्टी एलेवन ट्वेल्व में यह राशि वन करोड़ सिक्स्टी फोर थाउजेंड फोर हंड्रेड फिफ्टीन करोड़ थी </Example>, Only provide the normalized output with atmost accuracy inside <user> xml tag",label="System message"),
72
+ gr.Slider(minimum=1, maximum=2048, value=128 step=1, label="Max new tokens"),
73
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
74
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
75
  ],