Ayush0804 commited on
Commit
c6133ee
·
verified ·
1 Parent(s): a20dfe9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -1,12 +1,9 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
- def generate_response(text):
4
- # Load the Qwen2-Math pipeline
5
- pipe = pipeline("text-generation", model="qwen2-math-72b-instruct")
6
 
7
- # Generate the response
 
8
  response = pipe(text, max_length=512)[0]['generated_text']
9
-
10
  return response
11
 
12
  with gr.Blocks() as demo:
 
1
  import gradio as gr
2
  from transformers import pipeline
 
 
 
3
 
4
+ def generate_response(text):
5
+ pipe = pipeline("text-generation", model="text-davinci-003")
6
  response = pipe(text, max_length=512)[0]['generated_text']
 
7
  return response
8
 
9
  with gr.Blocks() as demo: