Yashvj123 commited on
Commit
8e2071b
·
verified ·
1 Parent(s): 7138883

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -36,7 +36,6 @@ st.set_page_config(
36
  # chunks.append(current.strip())
37
  # return chunks
38
 
39
- # Save text to image
40
  def save_text_as_image(text, file_path):
41
  font = ImageFont.load_default()
42
  lines = text.split('\n')
@@ -128,22 +127,22 @@ if uploaded_file:
128
 
129
  prompt = PromptTemplate(input_variables=["prescription_text"], template=template)
130
 
131
- llm = HuggingFaceEndpoint(
132
  repo_id="aaditya/Llama3-OpenBioLLM-70B",
133
  provider="nebius",
134
  temperature=0.6,
135
  max_new_tokens=300,
136
- task="text-generation"
137
  )
138
 
139
- # llm = ChatHuggingFace(
140
- # llm=llm_model,
141
- # repo_id="aaditya/Llama3-OpenBioLLM-70B",
142
- # provider="nebius",
143
- # temperature=0.6,
144
- # max_new_tokens=300,
145
- # task="conversational"
146
- # )
147
 
148
  chain = LLMChain(llm=llm, prompt=prompt)
149
 
 
36
  # chunks.append(current.strip())
37
  # return chunks
38
 
 
39
  def save_text_as_image(text, file_path):
40
  font = ImageFont.load_default()
41
  lines = text.split('\n')
 
127
 
128
  prompt = PromptTemplate(input_variables=["prescription_text"], template=template)
129
 
130
+ llm_model = HuggingFaceEndpoint(
131
  repo_id="aaditya/Llama3-OpenBioLLM-70B",
132
  provider="nebius",
133
  temperature=0.6,
134
  max_new_tokens=300,
135
+ task="conversational"
136
  )
137
 
138
+ llm = ChatHuggingFace(
139
+ llm=llm_model,
140
+ repo_id="aaditya/Llama3-OpenBioLLM-70B",
141
+ provider="nebius",
142
+ temperature=0.6,
143
+ max_new_tokens=300,
144
+ task="conversational"
145
+ )
146
 
147
  chain = LLMChain(llm=llm, prompt=prompt)
148