andreska commited on
Commit
2394fb5
·
verified ·
1 Parent(s): 4f47f17

Update to remove encoding and return response directly

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,6 @@ def analyze(project_data, question):
11
  )
12
 
13
  prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
14
- inputs = client.encoding("text", prompt)
15
 
16
  response = client.text_generation(
17
  prompt,
@@ -22,7 +21,8 @@ def analyze(project_data, question):
22
  do_sample=True
23
  )
24
 
25
- return outputs["generated_text"][0]
 
26
  except Exception as e:
27
  print(f"Error details: {str(e)}")
28
  return f"Error occurred: {str(e)}"
 
11
  )
12
 
13
  prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
 
14
 
15
  response = client.text_generation(
16
  prompt,
 
21
  do_sample=True
22
  )
23
 
24
+ return response
25
+
26
  except Exception as e:
27
  print(f"Error details: {str(e)}")
28
  return f"Error occurred: {str(e)}"